@strivacity/sdk-angular 3.0.1 → 3.0.2
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
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 3.0.2 (2026-05-12)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- language parameter added to the login renderer component ([c8f18d9](https://github.com/Strivacity/sdk-js/commit/c8f18d9))
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated sdk-core to 3.0.2
|
|
10
|
+
- Updated testing to 3.0.2
|
|
11
|
+
|
|
1
12
|
## 3.0.1 (2026-04-20)
|
|
2
13
|
|
|
3
14
|
### 🩹 Fixes
|
package/README.md
CHANGED
|
@@ -387,13 +387,15 @@ export const widgets = {
|
|
|
387
387
|
|
|
388
388
|
#### Login page example
|
|
389
389
|
|
|
390
|
-
The login page extracts `session_id` and optionally `language` from the URL on load, cleans up the URL, and passes them to the renderer. When a `session_id` is present the renderer calls `startSession(sessionId)` to resume the existing flow instead of starting a new one. When a `language` parameter is present it
|
|
390
|
+
The login page extracts `session_id` and optionally `language` from the URL on load, cleans up the URL, and passes them to the renderer. When a `session_id` is present the renderer calls `startSession(sessionId)` to resume the existing flow instead of starting a new one. When a `language` parameter is present it is passed to the renderer which uses it for the authentication UI and emits the resolved language via `(languageChange)`.
|
|
391
391
|
|
|
392
392
|
```html
|
|
393
393
|
<!-- login.component.html -->
|
|
394
394
|
<sty-login-renderer
|
|
395
395
|
[widgets]="widgets"
|
|
396
396
|
[sessionId]="sessionId"
|
|
397
|
+
[language]="language"
|
|
398
|
+
(languageChange)="onLanguageChange($event)"
|
|
397
399
|
(login)="onLogin()"
|
|
398
400
|
(fallback)="onFallback($event)"
|
|
399
401
|
(error)="onError($event)"
|
|
@@ -418,6 +420,7 @@ import { widgets } from './components/widgets';
|
|
|
418
420
|
export class LoginComponent implements OnInit {
|
|
419
421
|
widgets = widgets;
|
|
420
422
|
sessionId: string | null = null;
|
|
423
|
+
language: string | null = null;
|
|
421
424
|
|
|
422
425
|
constructor(private router: Router) {}
|
|
423
426
|
|
|
@@ -425,6 +428,11 @@ export class LoginComponent implements OnInit {
|
|
|
425
428
|
if (window.location.search !== '') {
|
|
426
429
|
const url = new URL(window.location.href);
|
|
427
430
|
this.sessionId = url.searchParams.get('session_id');
|
|
431
|
+
|
|
432
|
+
if (url.searchParams.has('language')) {
|
|
433
|
+
this.language = url.searchParams.get('language');
|
|
434
|
+
}
|
|
435
|
+
|
|
428
436
|
url.search = '';
|
|
429
437
|
history.replaceState({}, '', url.toString());
|
|
430
438
|
}
|
|
@@ -454,6 +462,10 @@ export class LoginComponent implements OnInit {
|
|
|
454
462
|
console.log('previousState', previousState);
|
|
455
463
|
console.log('state', state);
|
|
456
464
|
}
|
|
465
|
+
|
|
466
|
+
onLanguageChange(language: string | null): void {
|
|
467
|
+
this.language = language;
|
|
468
|
+
}
|
|
457
469
|
}
|
|
458
470
|
```
|
|
459
471
|
|
|
@@ -694,6 +706,60 @@ export class MyLogger implements SDKLogging {
|
|
|
694
706
|
|
|
695
707
|
The `SDKLogging` interface requires `debug`, `info`, `warn`, and `error` methods. The optional `xEventId` property, when set by the SDK, provides a correlation ID to trace related log messages across the authentication flow.
|
|
696
708
|
|
|
709
|
+
## HTTP Client
|
|
710
|
+
|
|
711
|
+
The SDK uses a built-in `fetch`-based HTTP client for all requests. You can replace it with your own implementation by extending `SDKHttpClient` and passing your class via the `httpClient` option. This is useful when you need to attach custom headers (e.g. `x-sty-app-id`) to every outgoing request or use a platform-specific transport such as Capacitor's `CapacitorHttp`.
|
|
712
|
+
|
|
713
|
+
### Adding custom headers to every request
|
|
714
|
+
|
|
715
|
+
```typescript
|
|
716
|
+
import { ApplicationConfig } from '@angular/core';
|
|
717
|
+
import { provideStrivacity, SDKHttpClient, type HttpClientResponse } from '@strivacity/sdk-angular';
|
|
718
|
+
|
|
719
|
+
class CustomHttpClient extends SDKHttpClient {
|
|
720
|
+
async request<T>(url: string, options?: RequestInit): Promise<HttpClientResponse<T>> {
|
|
721
|
+
const mergedOptions: RequestInit = {
|
|
722
|
+
...options,
|
|
723
|
+
headers: {
|
|
724
|
+
'x-sty-app-id': 'my-app',
|
|
725
|
+
...(options?.headers as Record<string, string>),
|
|
726
|
+
},
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
const response = await fetch(url, mergedOptions);
|
|
730
|
+
|
|
731
|
+
return {
|
|
732
|
+
headers: response.headers,
|
|
733
|
+
ok: response.ok,
|
|
734
|
+
status: response.status,
|
|
735
|
+
statusText: response.statusText,
|
|
736
|
+
url: response.url,
|
|
737
|
+
json: async () => (await response.json()) as T,
|
|
738
|
+
text: async () => await response.text(),
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
export const appConfig: ApplicationConfig = {
|
|
744
|
+
providers: [
|
|
745
|
+
provideStrivacity({
|
|
746
|
+
// ...other options
|
|
747
|
+
httpClient: CustomHttpClient,
|
|
748
|
+
}),
|
|
749
|
+
],
|
|
750
|
+
};
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
Any header you add inside `request()` is automatically included in every SDK request
|
|
754
|
+
|
|
755
|
+
### CORS configuration
|
|
756
|
+
|
|
757
|
+
For custom request headers to reach the Strivacity cluster, the cluster must be configured to explicitly allow them. Add the header name(s) to the **Access-Control-Allow-Headers** list in the cluster settings. Without this, browsers will block the preflight `OPTIONS` request and the SDK call will fail with a CORS error.
|
|
758
|
+
|
|
759
|
+
```
|
|
760
|
+
Access-Control-Allow-Headers: x-sty-app-id, <any other custom headers>
|
|
761
|
+
```
|
|
762
|
+
|
|
697
763
|
## API Documentation
|
|
698
764
|
|
|
699
765
|
### `StrivacityAuthService`
|
|
@@ -739,6 +805,7 @@ Used in `native` mode to render the authentication UI with your own widget compo
|
|
|
739
805
|
- **`params?: NativeParams`**: Additional parameters for the native login flow.
|
|
740
806
|
- **`widgets?: PartialRecord<WidgetType, Type<any>>`**: Custom Angular components for each widget type used in the flow.
|
|
741
807
|
- **`sessionId?: string | null`**: Session ID for resuming an existing authentication session.
|
|
808
|
+
- **`language?: string | null`**: Language tag (e.g. `"en-US"`) for the authentication UI. Defaults to `navigator.language`. After the session starts the component emits the resolved language via `(languageChange)`. See the [Translations](https://docs.strivacity.com/docs/translations) page to learn about language precedence implemented by the product.
|
|
742
809
|
|
|
743
810
|
**Outputs**
|
|
744
811
|
|
|
@@ -747,6 +814,7 @@ Used in `native` mode to render the authentication UI with your own widget compo
|
|
|
747
814
|
- **`(error)`**: Emitted when an error occurs during authentication.
|
|
748
815
|
- **`(globalMessage)`**: Emitted when the flow wants to display a global message (e.g. account lockout warning).
|
|
749
816
|
- **`(blockReady)`**: Emitted on flow state transitions. Receives `{ previousState: LoginFlowState; state: LoginFlowState }`. Useful for analytics and custom logging.
|
|
817
|
+
- **`(languageChange)`**: Emitted after the session starts with the resolved language string.
|
|
750
818
|
|
|
751
819
|
## Vulnerability Reporting
|
|
752
820
|
|
package/dist/README.md
CHANGED
|
@@ -387,13 +387,15 @@ export const widgets = {
|
|
|
387
387
|
|
|
388
388
|
#### Login page example
|
|
389
389
|
|
|
390
|
-
The login page extracts `session_id` and optionally `language` from the URL on load, cleans up the URL, and passes them to the renderer. When a `session_id` is present the renderer calls `startSession(sessionId)` to resume the existing flow instead of starting a new one. When a `language` parameter is present it
|
|
390
|
+
The login page extracts `session_id` and optionally `language` from the URL on load, cleans up the URL, and passes them to the renderer. When a `session_id` is present the renderer calls `startSession(sessionId)` to resume the existing flow instead of starting a new one. When a `language` parameter is present it is passed to the renderer which uses it for the authentication UI and emits the resolved language via `(languageChange)`.
|
|
391
391
|
|
|
392
392
|
```html
|
|
393
393
|
<!-- login.component.html -->
|
|
394
394
|
<sty-login-renderer
|
|
395
395
|
[widgets]="widgets"
|
|
396
396
|
[sessionId]="sessionId"
|
|
397
|
+
[language]="language"
|
|
398
|
+
(languageChange)="onLanguageChange($event)"
|
|
397
399
|
(login)="onLogin()"
|
|
398
400
|
(fallback)="onFallback($event)"
|
|
399
401
|
(error)="onError($event)"
|
|
@@ -418,6 +420,7 @@ import { widgets } from './components/widgets';
|
|
|
418
420
|
export class LoginComponent implements OnInit {
|
|
419
421
|
widgets = widgets;
|
|
420
422
|
sessionId: string | null = null;
|
|
423
|
+
language: string | null = null;
|
|
421
424
|
|
|
422
425
|
constructor(private router: Router) {}
|
|
423
426
|
|
|
@@ -425,6 +428,11 @@ export class LoginComponent implements OnInit {
|
|
|
425
428
|
if (window.location.search !== '') {
|
|
426
429
|
const url = new URL(window.location.href);
|
|
427
430
|
this.sessionId = url.searchParams.get('session_id');
|
|
431
|
+
|
|
432
|
+
if (url.searchParams.has('language')) {
|
|
433
|
+
this.language = url.searchParams.get('language');
|
|
434
|
+
}
|
|
435
|
+
|
|
428
436
|
url.search = '';
|
|
429
437
|
history.replaceState({}, '', url.toString());
|
|
430
438
|
}
|
|
@@ -454,6 +462,10 @@ export class LoginComponent implements OnInit {
|
|
|
454
462
|
console.log('previousState', previousState);
|
|
455
463
|
console.log('state', state);
|
|
456
464
|
}
|
|
465
|
+
|
|
466
|
+
onLanguageChange(language: string | null): void {
|
|
467
|
+
this.language = language;
|
|
468
|
+
}
|
|
457
469
|
}
|
|
458
470
|
```
|
|
459
471
|
|
|
@@ -694,6 +706,60 @@ export class MyLogger implements SDKLogging {
|
|
|
694
706
|
|
|
695
707
|
The `SDKLogging` interface requires `debug`, `info`, `warn`, and `error` methods. The optional `xEventId` property, when set by the SDK, provides a correlation ID to trace related log messages across the authentication flow.
|
|
696
708
|
|
|
709
|
+
## HTTP Client
|
|
710
|
+
|
|
711
|
+
The SDK uses a built-in `fetch`-based HTTP client for all requests. You can replace it with your own implementation by extending `SDKHttpClient` and passing your class via the `httpClient` option. This is useful when you need to attach custom headers (e.g. `x-sty-app-id`) to every outgoing request or use a platform-specific transport such as Capacitor's `CapacitorHttp`.
|
|
712
|
+
|
|
713
|
+
### Adding custom headers to every request
|
|
714
|
+
|
|
715
|
+
```typescript
|
|
716
|
+
import { ApplicationConfig } from '@angular/core';
|
|
717
|
+
import { provideStrivacity, SDKHttpClient, type HttpClientResponse } from '@strivacity/sdk-angular';
|
|
718
|
+
|
|
719
|
+
class CustomHttpClient extends SDKHttpClient {
|
|
720
|
+
async request<T>(url: string, options?: RequestInit): Promise<HttpClientResponse<T>> {
|
|
721
|
+
const mergedOptions: RequestInit = {
|
|
722
|
+
...options,
|
|
723
|
+
headers: {
|
|
724
|
+
'x-sty-app-id': 'my-app',
|
|
725
|
+
...(options?.headers as Record<string, string>),
|
|
726
|
+
},
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
const response = await fetch(url, mergedOptions);
|
|
730
|
+
|
|
731
|
+
return {
|
|
732
|
+
headers: response.headers,
|
|
733
|
+
ok: response.ok,
|
|
734
|
+
status: response.status,
|
|
735
|
+
statusText: response.statusText,
|
|
736
|
+
url: response.url,
|
|
737
|
+
json: async () => (await response.json()) as T,
|
|
738
|
+
text: async () => await response.text(),
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
export const appConfig: ApplicationConfig = {
|
|
744
|
+
providers: [
|
|
745
|
+
provideStrivacity({
|
|
746
|
+
// ...other options
|
|
747
|
+
httpClient: CustomHttpClient,
|
|
748
|
+
}),
|
|
749
|
+
],
|
|
750
|
+
};
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
Any header you add inside `request()` is automatically included in every SDK request
|
|
754
|
+
|
|
755
|
+
### CORS configuration
|
|
756
|
+
|
|
757
|
+
For custom request headers to reach the Strivacity cluster, the cluster must be configured to explicitly allow them. Add the header name(s) to the **Access-Control-Allow-Headers** list in the cluster settings. Without this, browsers will block the preflight `OPTIONS` request and the SDK call will fail with a CORS error.
|
|
758
|
+
|
|
759
|
+
```
|
|
760
|
+
Access-Control-Allow-Headers: x-sty-app-id, <any other custom headers>
|
|
761
|
+
```
|
|
762
|
+
|
|
697
763
|
## API Documentation
|
|
698
764
|
|
|
699
765
|
### `StrivacityAuthService`
|
|
@@ -739,6 +805,7 @@ Used in `native` mode to render the authentication UI with your own widget compo
|
|
|
739
805
|
- **`params?: NativeParams`**: Additional parameters for the native login flow.
|
|
740
806
|
- **`widgets?: PartialRecord<WidgetType, Type<any>>`**: Custom Angular components for each widget type used in the flow.
|
|
741
807
|
- **`sessionId?: string | null`**: Session ID for resuming an existing authentication session.
|
|
808
|
+
- **`language?: string | null`**: Language tag (e.g. `"en-US"`) for the authentication UI. Defaults to `navigator.language`. After the session starts the component emits the resolved language via `(languageChange)`. See the [Translations](https://docs.strivacity.com/docs/translations) page to learn about language precedence implemented by the product.
|
|
742
809
|
|
|
743
810
|
**Outputs**
|
|
744
811
|
|
|
@@ -747,6 +814,7 @@ Used in `native` mode to render the authentication UI with your own widget compo
|
|
|
747
814
|
- **`(error)`**: Emitted when an error occurs during authentication.
|
|
748
815
|
- **`(globalMessage)`**: Emitted when the flow wants to display a global message (e.g. account lockout warning).
|
|
749
816
|
- **`(blockReady)`**: Emitted on flow state transitions. Receives `{ previousState: LoginFlowState; state: LoginFlowState }`. Useful for analytics and custom logging.
|
|
817
|
+
- **`(languageChange)`**: Emitted after the session starts with the resolved language string.
|
|
750
818
|
|
|
751
819
|
## Vulnerability Reporting
|
|
752
820
|
|
|
@@ -297,6 +297,7 @@ class StyLoginRenderer {
|
|
|
297
297
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
298
298
|
widgets;
|
|
299
299
|
sessionId;
|
|
300
|
+
language;
|
|
300
301
|
params = {};
|
|
301
302
|
onLogin = new EventEmitter();
|
|
302
303
|
onFallback = new EventEmitter();
|
|
@@ -305,6 +306,7 @@ class StyLoginRenderer {
|
|
|
305
306
|
onError = new EventEmitter();
|
|
306
307
|
onGlobalMessage = new EventEmitter();
|
|
307
308
|
onBlockReady = new EventEmitter();
|
|
309
|
+
onLanguageChange = new EventEmitter();
|
|
308
310
|
$containerRef;
|
|
309
311
|
constructor(authService, widgetService) {
|
|
310
312
|
this.authService = authService;
|
|
@@ -395,7 +397,7 @@ class StyLoginRenderer {
|
|
|
395
397
|
async init() {
|
|
396
398
|
try {
|
|
397
399
|
this.loginHandler = this.authService.sdk.login(this.params);
|
|
398
|
-
const data = (await this.loginHandler.startSession(this.sessionId));
|
|
400
|
+
const data = (await this.loginHandler.startSession(this.sessionId, this.language));
|
|
399
401
|
const previousState = JSON.parse(JSON.stringify(this.widgetService.state$.value));
|
|
400
402
|
const newState = {
|
|
401
403
|
hostedUrl: data?.hostedUrl ?? this.widgetService.state$.value.hostedUrl,
|
|
@@ -406,6 +408,7 @@ class StyLoginRenderer {
|
|
|
406
408
|
messages: data?.messages ?? {},
|
|
407
409
|
branding: data?.branding ?? this.widgetService.state$.value.branding,
|
|
408
410
|
};
|
|
411
|
+
this.onLanguageChange.emit(this.loginHandler.language);
|
|
409
412
|
if (await this.authService.sdk.isAuthenticated) {
|
|
410
413
|
this.onLogin.emit(this.authService.sdk.idTokenClaims);
|
|
411
414
|
}
|
|
@@ -481,7 +484,7 @@ class StyLoginRenderer {
|
|
|
481
484
|
this.$containerRef?.clear();
|
|
482
485
|
}
|
|
483
486
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: StyLoginRenderer, deps: [{ token: StrivacityAuthService }, { token: StrivacityWidgetService }], target: i0.ɵɵFactoryTarget.Component });
|
|
484
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: StyLoginRenderer, isStandalone: true, selector: "sty-login-renderer", inputs: { widgets: "widgets", sessionId: "sessionId", params: "params" }, outputs: { onLogin: "login", onFallback: "fallback", onClose: "close", onError: "error", onGlobalMessage: "globalMessage", onBlockReady: "blockReady" }, host: { classAttribute: "login-renderer" }, viewQueries: [{ propertyName: "$containerRef", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: '<ng-container #container></ng-container>', isInline: true });
|
|
487
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: StyLoginRenderer, isStandalone: true, selector: "sty-login-renderer", inputs: { widgets: "widgets", sessionId: "sessionId", language: "language", params: "params" }, outputs: { onLogin: "login", onFallback: "fallback", onClose: "close", onError: "error", onGlobalMessage: "globalMessage", onBlockReady: "blockReady", onLanguageChange: "languageChange" }, host: { classAttribute: "login-renderer" }, viewQueries: [{ propertyName: "$containerRef", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: '<ng-container #container></ng-container>', isInline: true });
|
|
485
488
|
}
|
|
486
489
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: StyLoginRenderer, decorators: [{
|
|
487
490
|
type: Component,
|
|
@@ -499,6 +502,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
499
502
|
args: [{ required: true }]
|
|
500
503
|
}], sessionId: [{
|
|
501
504
|
type: Input
|
|
505
|
+
}], language: [{
|
|
506
|
+
type: Input
|
|
502
507
|
}], params: [{
|
|
503
508
|
type: Input
|
|
504
509
|
}], onLogin: [{
|
|
@@ -519,6 +524,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
519
524
|
}], onBlockReady: [{
|
|
520
525
|
type: Output,
|
|
521
526
|
args: ['blockReady']
|
|
527
|
+
}], onLanguageChange: [{
|
|
528
|
+
type: Output,
|
|
529
|
+
args: ['languageChange']
|
|
522
530
|
}], $containerRef: [{
|
|
523
531
|
type: ViewChild,
|
|
524
532
|
args: ['container', { read: ViewContainerRef, static: true }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strivacity-sdk-angular.mjs","sources":["../../src/lib/services/widget.service.ts","../../src/lib/components/widget-renderer.component.ts","../../src/lib/utils/helpers.ts","../../src/lib/services/auth.service.ts","../../src/lib/components/login-renderer.component.ts","../../src/lib/strivacity-auth.module.ts","../../src/strivacity-sdk-angular.ts"],"sourcesContent":["import type { LoginFlowMessage, LoginFlowState } from '@strivacity/sdk-core';\nimport { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nexport interface NativeFlowState {\n\tloading: boolean;\n\tformContexts: Record<string, Record<string, unknown>>;\n\tmessageContexts: Record<string, Record<string, string | null>>;\n\tstate: LoginFlowState;\n}\n\n/**\n * Service that manages Strivacity native widgets.\n */\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class StrivacityWidgetService {\n\treadonly loading$ = new BehaviorSubject<boolean>(false);\n\treadonly forms$ = new BehaviorSubject<Record<string, Record<string, unknown>>>({});\n\treadonly messages$ = new BehaviorSubject<Record<string, Record<string, LoginFlowMessage>>>({});\n\treadonly state$ = new BehaviorSubject<LoginFlowState>({});\n\n\ttriggerFallback!: (hostedUrl?: string, message?: string) => void;\n\ttriggerClose!: () => void;\n\tsubmitForm!: (formId: string) => Promise<void>;\n\n\tsetFormValue(formId: string, widgetId: string, value: unknown) {\n\t\tconst forms = { ...this.forms$.value };\n\t\tforms[formId] = { ...(forms[formId] || {}), [widgetId]: value === '' ? null : value };\n\n\t\tthis.forms$.next(forms);\n\t}\n\n\tsetMessage(formId: string, widgetId: string, value: LoginFlowMessage) {\n\t\tconst messages = { ...this.messages$.value };\n\t\tmessages[formId] = { ...(messages[formId] || {}), [widgetId]: value };\n\n\t\tthis.messages$.next(messages);\n\t}\n}\n","import type { Type, SimpleChanges, OnChanges } from '@angular/core';\nimport type { WidgetType, LayoutWidget, Widget } from '@strivacity/sdk-core';\nimport { Component, Input, ViewContainerRef, ViewChild } from '@angular/core';\nimport { StrivacityWidgetService } from '../services/widget.service';\n\n@Component({\n\tstandalone: true,\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'sty-widget-renderer',\n\ttemplate: '<ng-container #container></ng-container>',\n\tstyles: `\n\t\t:host {\n\t\t\tdisplay: contents;\n\t\t}\n\t`,\n})\nexport class StyWidgetRenderer implements OnChanges {\n\t@Input() items: LayoutWidget['items'] = [];\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t@Input({ required: true }) widgets!: Record<WidgetType, Type<any>>;\n\n\t@ViewChild('container', { read: ViewContainerRef, static: true }) readonly $containerRef!: ViewContainerRef;\n\n\tconstructor(protected widgetService: StrivacityWidgetService) {}\n\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tif (changes['items']) {\n\t\t\tthis.render();\n\t\t}\n\t}\n\n\trender(): void {\n\t\tthis.$containerRef.clear();\n\n\t\tif (!this.items) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const item of this.items) {\n\t\t\tif (item.type === 'widget') {\n\t\t\t\tconst form = this.widgetService.state$.value.forms?.find((f) => f.id === item.formId);\n\t\t\t\tconst widget = form?.widgets.find((w) => w.id === item.widgetId);\n\t\t\t\tconst component = widget ? this.widgets[widget.type] : undefined;\n\n\t\t\t\tif (!form || !widget) {\n\t\t\t\t\tthis.widgetService.triggerFallback(undefined, `Unable to find form or widget for item: formId=${item.formId}, widgetId=${item.widgetId}`);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (!component) {\n\t\t\t\t\tthis.widgetService.triggerFallback(undefined, `No component found for widget type ${widget.type}`);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst componentRef = this.$containerRef.createComponent(component);\n\t\t\t\tcomponentRef.setInput('formId', item.formId);\n\t\t\t\tcomponentRef.setInput('config', widget);\n\t\t\t\tcomponentRef.changeDetectorRef.detectChanges();\n\t\t\t} else if (item.type === 'vertical' || item.type === 'horizontal') {\n\t\t\t\tconst component = this.widgets.layout;\n\n\t\t\t\tif (!component) {\n\t\t\t\t\tthis.widgetService.triggerFallback(undefined, 'No layout component provided');\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst widgetRendererRef = this.$containerRef.createComponent(StyWidgetRenderer);\n\t\t\t\twidgetRendererRef.setInput('items', item.items);\n\t\t\t\twidgetRendererRef.setInput('widgets', this.widgets);\n\t\t\t\twidgetRendererRef.changeDetectorRef.detectChanges();\n\n\t\t\t\tconst layoutRef = this.$containerRef.createComponent(component, {\n\t\t\t\t\tprojectableNodes: [[widgetRendererRef.location.nativeElement]],\n\t\t\t\t});\n\t\t\t\tlayoutRef.setInput('formId', (item.items[0] as Widget)?.formId);\n\t\t\t\tlayoutRef.setInput('type', item.type);\n\t\t\t\tlayoutRef.changeDetectorRef.detectChanges();\n\t\t\t} else {\n\t\t\t\tthis.widgetService.triggerFallback(undefined, 'Unknown item type in layout');\n\t\t\t}\n\t\t}\n\t}\n}\n","import { InjectionToken } from '@angular/core';\nimport type { SDKOptions } from '@strivacity/sdk-core';\n\nexport const STRIVACITY_SDK = new InjectionToken<SDKOptions>('sty');\n\n/**\n * Provides the Strivacity SDK configuration as a dependency injection token.\n *\n * This function is used to supply the Strivacity SDK configuration to the application\n * by binding it to the `STRIVACITY_SDK` token.\n *\n * @param {SDKOptions} config The SDK configuration options.\n * @returns {{ provide: InjectionToken<SDKOptions>, useValue: SDKOptions }} An object that provides the SDK configuration using the `STRIVACITY_SDK` token.\n */\nexport function provideStrivacity(config: SDKOptions) {\n\treturn { provide: STRIVACITY_SDK, useValue: config };\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { type Observable, BehaviorSubject, from } from 'rxjs';\nimport type { PopupFlow } from '@strivacity/sdk-core/flows/PopupFlow';\nimport type { RedirectFlow } from '@strivacity/sdk-core/flows/RedirectFlow';\nimport type { NativeFlow } from '@strivacity/sdk-core/flows/NativeFlow';\nimport { type SDKOptions, initFlow } from '@strivacity/sdk-core';\nimport type { Session } from '../utils/types';\nimport { STRIVACITY_SDK } from '../utils/helpers';\n\n/**\n * Service that manages Strivacity authentication flows.\n * Supports either PopupFlow or RedirectFlow types.\n *\n * @template Flow Type of authentication flow (PopupFlow or RedirectFlow).\n * @template Options Type of SDK options (defaults to SDKOptions).\n */\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class StrivacityAuthService<\n\tFlow extends PopupFlow | RedirectFlow | NativeFlow = PopupFlow | RedirectFlow | NativeFlow,\n\tOptions extends SDKOptions = SDKOptions,\n> {\n\t/**\n\t * Instance of the authentication flow (PopupFlow or RedirectFlow).\n\t */\n\tsdk: Flow;\n\n\t/**\n\t * BehaviorSubject that holds the current session state.\n\t * @protected\n\t * @readonly\n\t */\n\tprivate readonly sessionSubject: BehaviorSubject<Session>;\n\n\t/**\n\t * Observable that emits the session state changes.\n\t * @readonly\n\t */\n\treadonly session$: Observable<Session>;\n\n\t/**\n\t * Creates an instance of StrivacityAuthService.\n\t *\n\t * @param {Options} options SDK configuration options injected via STRIVACITY_SDK.\n\t */\n\tconstructor(@Inject(STRIVACITY_SDK) public options: Options) {\n\t\tthis.sdk = initFlow(options) as Flow;\n\t\tthis.sessionSubject = new BehaviorSubject<Session>({\n\t\t\tloading: true,\n\t\t\tisAuthenticated: false,\n\t\t\tidTokenClaims: null,\n\t\t\taccessToken: null,\n\t\t\trefreshToken: null,\n\t\t\taccessTokenExpired: true,\n\t\t\taccessTokenExpirationDate: null,\n\t\t});\n\t\tthis.session$ = this.sessionSubject.asObservable();\n\n\t\tconst updateSession = async () => {\n\t\t\tthis.sessionSubject.next({\n\t\t\t\tloading: false,\n\t\t\t\tisAuthenticated: await this.sdk.isAuthenticated,\n\t\t\t\tidTokenClaims: this.sdk.idTokenClaims || null,\n\t\t\t\taccessToken: this.sdk.accessToken || null,\n\t\t\t\trefreshToken: this.sdk.refreshToken || null,\n\t\t\t\taccessTokenExpired: this.sdk.accessTokenExpired,\n\t\t\t\taccessTokenExpirationDate: this.sdk.accessTokenExpirationDate || null,\n\t\t\t});\n\t\t};\n\n\t\tthis.sdk.subscribeToEvent('init', updateSession);\n\t\tthis.sdk.subscribeToEvent('loggedIn', updateSession);\n\t\tthis.sdk.subscribeToEvent('sessionLoaded', updateSession);\n\t\tthis.sdk.subscribeToEvent('tokenRefreshed', updateSession);\n\t\tthis.sdk.subscribeToEvent('tokenRefreshFailed', updateSession);\n\t\tthis.sdk.subscribeToEvent('logoutInitiated', updateSession);\n\t\tthis.sdk.subscribeToEvent('tokenRevoked', updateSession);\n\t\tthis.sdk.subscribeToEvent('tokenRevokeFailed', updateSession);\n\t}\n\n\t/**\n\t * Checks if the user is authenticated.\n\t *\n\t * @returns {Observable<boolean>} An observable that emits the authentication status.\n\t */\n\tisAuthenticated() {\n\t\treturn from(this.sdk.isAuthenticated);\n\t}\n\n\t/**\n\t * Logs the user in using the specified options.\n\t *\n\t * @param {Parameters<Flow['login']>[0]} [options] Options to customize the login behavior.\n\t * @returns {Observable<void>} An observable that completes when the login process is done.\n\t */\n\tlogin(options?: Parameters<Flow['login']>[0]) {\n\t\tconst result = this.sdk.login(options);\n\n\t\tif (result instanceof Promise) {\n\t\t\treturn from(result);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Initiates the entry process using the provided challenge.\n\t *\n\t * @param {string} [url] Optional URL to use for the entry process. If not provided, the current window location will be used.\n\t * @returns {Observable<void>} An observable that completes when the entry process is done.\n\t */\n\tentry(url?: string) {\n\t\tconst result = this.sdk.entry(url);\n\n\t\tif (result instanceof Promise) {\n\t\t\treturn from(result);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Registers a new user using the specified options.\n\t *\n\t * @param {Parameters<Flow['register']>[0]} [options] Options to customize the registration behavior.\n\t * @returns {Observable<void>} An observable that completes when the registration process is done.\n\t */\n\tregister(options?: Parameters<Flow['register']>[0]) {\n\t\tconst result = this.sdk.register(options);\n\n\t\tif (result instanceof Promise) {\n\t\t\treturn from(result);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Refreshes the current authentication session.\n\t *\n\t * @returns {Observable<void>} An observable that completes when the session is refreshed.\n\t */\n\trefresh() {\n\t\treturn from(this.sdk.refresh());\n\t}\n\n\t/**\n\t * Revokes the current session tokens.\n\t *\n\t * @returns {Observable<void>} An observable that completes when the tokens are revoked.\n\t */\n\trevoke() {\n\t\treturn from(this.sdk.revoke());\n\t}\n\n\t/**\n\t * Logs the user out using the specified options.\n\t *\n\t * @param {Parameters<Flow['logout']>[0]} [options] Options to customize the logout behavior.\n\t * @returns {Observable<void>} An observable that completes when the logout process is done.\n\t */\n\tlogout(options?: Parameters<Flow['logout']>[0]) {\n\t\treturn from(this.sdk.logout(options));\n\t}\n\n\t/**\n\t * Handles the authentication callback (e.g., after a redirect or popup flow).\n\t *\n\t * @param {Parameters<Flow['handleCallback']>[0]} [url] The URL to handle for the callback.\n\t * @returns {Observable<void>} An observable that completes when the callback is handled.\n\t */\n\thandleCallback(url?: Parameters<Flow['handleCallback']>[0]) {\n\t\treturn from(this.sdk.handleCallback(url));\n\t}\n}\n","import type { OnInit, OnDestroy, ComponentRef } from '@angular/core';\nimport type { NativeFlow } from '@strivacity/sdk-core/flows/NativeFlow';\nimport type { IdTokenClaims, NativeParams, WidgetType, LoginFlowState, LoginFlowMessage, Widget } from '@strivacity/sdk-core';\nimport { Component, EventEmitter, Input, Output, Type, ViewChild, ViewContainerRef } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { FallbackError } from '@strivacity/sdk-core';\nimport { StrivacityAuthService } from '../services/auth.service';\nimport { StrivacityWidgetService } from '../services/widget.service';\nimport { unflattenObject } from '@strivacity/sdk-core/utils/object';\nimport { StyWidgetRenderer } from './widget-renderer.component';\n\n@Component({\n\tstandalone: true,\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'sty-login-renderer',\n\ttemplate: '<ng-container #container></ng-container>',\n\thost: {\n\t\tclass: 'login-renderer',\n\t},\n})\nexport class StyLoginRenderer implements OnInit, OnDestroy {\n\tprivate subscriptions = new Subscription();\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tprivate createdComponentRefs: ComponentRef<any>[] = [];\n\tloginHandler!: ReturnType<StrivacityAuthService<NativeFlow>['sdk']['login']>;\n\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t@Input({ required: true }) widgets!: Record<WidgetType, Type<any>>;\n\t@Input() sessionId?: string | null;\n\t@Input() params: NativeParams = {};\n\n\t@Output('login') readonly onLogin = new EventEmitter<IdTokenClaims | null | undefined>();\n\t@Output('fallback') readonly onFallback = new EventEmitter<FallbackError>();\n\t@Output('close') readonly onClose = new EventEmitter();\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t@Output('error') readonly onError = new EventEmitter<any>();\n\t@Output('globalMessage') readonly onGlobalMessage = new EventEmitter<string>();\n\t@Output('blockReady') readonly onBlockReady = new EventEmitter<{ previousState: LoginFlowState; state: LoginFlowState }>();\n\n\t@ViewChild('container', { read: ViewContainerRef, static: true }) readonly $containerRef!: ViewContainerRef;\n\n\tconstructor(\n\t\tprotected authService: StrivacityAuthService<NativeFlow>,\n\t\tprotected widgetService: StrivacityWidgetService,\n\t) {\n\t\tthis.widgetService.triggerFallback = (hostedUrl?: string, message?: string) => {\n\t\t\tconst url = hostedUrl || this.widgetService.state$.value.hostedUrl;\n\n\t\t\tthis.authService.sdk.logging?.warn(message ? `Triggering fallback due to: ${message}` : 'Triggering fallback');\n\n\t\t\tif (!url) {\n\t\t\t\tconst error = new Error('No hosted URL provided');\n\t\t\t\tthis.authService.sdk.logging?.error('Fallback error', error);\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\tthis.onFallback.emit(new FallbackError(new URL(url)));\n\t\t};\n\t\tthis.widgetService.triggerClose = () => {\n\t\t\tthis.onClose.emit();\n\t\t};\n\t\tthis.widgetService.submitForm = async (formId: string) => {\n\t\t\ttry {\n\t\t\t\tthis.widgetService.loading$.next(true);\n\n\t\t\t\tconst data = await this.loginHandler.submitForm(formId, unflattenObject(this.widgetService.forms$.value[formId]));\n\n\t\t\t\tif (await this.authService.sdk.isAuthenticated) {\n\t\t\t\t\tthis.onLogin.emit(this.authService.sdk.idTokenClaims);\n\t\t\t\t} else {\n\t\t\t\t\tconst previousState = JSON.parse(JSON.stringify(this.widgetService.state$.value));\n\t\t\t\t\tconst newState: LoginFlowState = {\n\t\t\t\t\t\thostedUrl: data?.hostedUrl ?? this.widgetService.state$.value.hostedUrl,\n\t\t\t\t\t\tfinalizeUrl: data?.finalizeUrl ?? this.widgetService.state$.value.finalizeUrl,\n\t\t\t\t\t\tscreen: data?.screen ?? this.widgetService.state$.value.screen,\n\t\t\t\t\t\tforms: data?.forms ?? this.widgetService.state$.value.forms,\n\t\t\t\t\t\tlayout: data?.layout ?? this.widgetService.state$.value.layout,\n\t\t\t\t\t\tmessages: data?.messages ?? {},\n\t\t\t\t\t\tbranding: data?.branding ?? this.widgetService.state$.value.branding,\n\t\t\t\t\t};\n\n\t\t\t\t\tif (newState.screen !== this.widgetService.state$.value.screen) {\n\t\t\t\t\t\tconst forms: Record<string, Record<string, unknown>> = {};\n\t\t\t\t\t\tconst messages: Record<string, Record<string, LoginFlowMessage>> = {};\n\n\t\t\t\t\t\tfor (const form of newState.forms ?? []) {\n\t\t\t\t\t\t\tforms[form.id] = {};\n\t\t\t\t\t\t\tmessages[form.id] = {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.widgetService.forms$.next(forms);\n\t\t\t\t\t\tthis.widgetService.messages$.next(messages);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.authService.sdk.logging?.info(`Updating screen: ${newState.screen}`);\n\t\t\t\t\t}\n\n\t\t\t\t\tObject.keys(newState.messages ?? {}).forEach((formId) => {\n\t\t\t\t\t\tif (formId === 'global') {\n\t\t\t\t\t\t\tthis.onGlobalMessage.emit(newState.messages?.global?.text ?? '');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst messages = { ...this.widgetService.messages$.value };\n\t\t\t\t\t\t\tmessages[formId] = newState.messages![formId];\n\t\t\t\t\t\t\tthis.widgetService.messages$.next(messages);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tthis.widgetService.state$.next(newState);\n\t\t\t\t\tthis.onBlockReady.emit({ previousState, state: structuredClone(newState) });\n\t\t\t\t\tthis.widgetService.loading$.next(false);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof FallbackError) {\n\t\t\t\t\tthis.onFallback.emit(error);\n\t\t\t\t} else {\n\t\t\t\t\tthis.onError.emit(error);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\n\tngOnInit() {\n\t\tthis.subscriptions.add(\n\t\t\tthis.widgetService.state$.subscribe((state) => {\n\t\t\t\tthis.render(state);\n\t\t\t}),\n\t\t);\n\t\tvoid this.init();\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.subscriptions.unsubscribe();\n\t\tthis.clearAndDestroyComponents();\n\t\tthis.widgetService.loading$.next(false);\n\t\tthis.widgetService.state$.next({});\n\t\tthis.widgetService.forms$.next({});\n\t\tthis.widgetService.messages$.next({});\n\t}\n\n\tasync init() {\n\t\ttry {\n\t\t\tthis.loginHandler = this.authService.sdk.login(this.params);\n\n\t\t\tconst data = (await this.loginHandler.startSession(this.sessionId)) as LoginFlowState;\n\t\t\tconst previousState = JSON.parse(JSON.stringify(this.widgetService.state$.value));\n\t\t\tconst newState = {\n\t\t\t\thostedUrl: data?.hostedUrl ?? this.widgetService.state$.value.hostedUrl,\n\t\t\t\tfinalizeUrl: data?.finalizeUrl ?? this.widgetService.state$.value.finalizeUrl,\n\t\t\t\tscreen: data?.screen ?? this.widgetService.state$.value.screen,\n\t\t\t\tforms: data?.forms ?? this.widgetService.state$.value.forms,\n\t\t\t\tlayout: data?.layout ?? this.widgetService.state$.value.layout,\n\t\t\t\tmessages: data?.messages ?? {},\n\t\t\t\tbranding: data?.branding ?? this.widgetService.state$.value.branding,\n\t\t\t};\n\n\t\t\tif (await this.authService.sdk.isAuthenticated) {\n\t\t\t\tthis.onLogin.emit(this.authService.sdk.idTokenClaims);\n\t\t\t} else {\n\t\t\t\tif (newState.screen !== this.widgetService.state$.value.screen) {\n\t\t\t\t\tconst newFormContexts: Record<string, Record<string, unknown>> = {};\n\t\t\t\t\tconst newMessageContexts: Record<string, Record<string, LoginFlowMessage>> = {};\n\n\t\t\t\t\tfor (const form of newState.forms ?? []) {\n\t\t\t\t\t\tnewFormContexts[form.id] = {};\n\t\t\t\t\t\tnewMessageContexts[form.id] = {};\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.widgetService.forms$.next(newFormContexts);\n\t\t\t\t\tthis.widgetService.messages$.next(newMessageContexts);\n\t\t\t\t}\n\n\t\t\t\tObject.keys(newState.messages ?? {}).forEach((formId) => {\n\t\t\t\t\tif (formId === 'global') {\n\t\t\t\t\t\tthis.onGlobalMessage.emit(newState.messages?.global?.text ?? '');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst messages = { ...this.widgetService.messages$.value };\n\t\t\t\t\t\tmessages[formId] = newState.messages[formId];\n\n\t\t\t\t\t\tthis.widgetService.messages$.next(messages);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tthis.widgetService.state$.next(newState);\n\t\t\t\tthis.onBlockReady.emit({ previousState, state: structuredClone(newState) });\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (error instanceof FallbackError) {\n\t\t\t\tthis.onFallback.emit(error);\n\t\t\t} else {\n\t\t\t\tthis.onError.emit(error);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate render(state: LoginFlowState): void {\n\t\tthis.clearAndDestroyComponents();\n\n\t\tif (state.screen) {\n\t\t\tconst component = this.widgets['layout'];\n\n\t\t\tif (!component) {\n\t\t\t\tthis.widgetService.triggerFallback(undefined, 'No layout component provided');\n\t\t\t}\n\n\t\t\tconst widgetRendererRef = this.$containerRef.createComponent(StyWidgetRenderer);\n\t\t\twidgetRendererRef.setInput('items', state.layout?.items);\n\t\t\twidgetRendererRef.setInput('widgets', this.widgets);\n\t\t\twidgetRendererRef.changeDetectorRef.detectChanges();\n\n\t\t\tconst layoutRef = this.$containerRef.createComponent(component, {\n\t\t\t\tprojectableNodes: [[widgetRendererRef.location.nativeElement]],\n\t\t\t});\n\t\t\tlayoutRef.setInput('formId', (state.layout?.items[0] as Widget)?.formId);\n\t\t\tlayoutRef.setInput('type', state.layout?.type);\n\t\t\tlayoutRef.setInput('tag', 'form');\n\t\t\tlayoutRef.changeDetectorRef.detectChanges();\n\n\t\t\tthis.createdComponentRefs.push(widgetRendererRef, layoutRef);\n\t\t} else {\n\t\t\tconst loadingComponentType = this.widgets['loading'];\n\n\t\t\tif (loadingComponentType) {\n\t\t\t\tconst loadingRef = this.$containerRef.createComponent(loadingComponentType);\n\n\t\t\t\tthis.createdComponentRefs.push(loadingRef);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate clearAndDestroyComponents(): void {\n\t\tthis.createdComponentRefs.forEach((ref) => {\n\t\t\tif (!ref.hostView.destroyed) {\n\t\t\t\tref.destroy();\n\t\t\t}\n\t\t});\n\t\tthis.createdComponentRefs = [];\n\t\tthis.$containerRef?.clear();\n\t}\n}\n","import { type ModuleWithProviders, CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport type { SDKOptions } from '@strivacity/sdk-core';\nimport { StrivacityAuthService } from './services/auth.service';\nimport { provideStrivacity } from './utils/helpers';\nimport { StyLoginRenderer } from './components/login-renderer.component';\n\n@NgModule({\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tproviders: [StrivacityAuthService],\n\timports: [StyLoginRenderer],\n\texports: [StyLoginRenderer],\n})\nexport class StrivacityAuthModule {\n\tstatic forRoot(options: SDKOptions): ModuleWithProviders<StrivacityAuthModule> {\n\t\treturn {\n\t\t\tngModule: StrivacityAuthModule,\n\t\t\tproviders: [provideStrivacity(options)],\n\t\t};\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.StrivacityWidgetService","i1.StrivacityAuthService","i2.StrivacityWidgetService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|
|
1
|
+
{"version":3,"file":"strivacity-sdk-angular.mjs","sources":["../../src/lib/services/widget.service.ts","../../src/lib/components/widget-renderer.component.ts","../../src/lib/utils/helpers.ts","../../src/lib/services/auth.service.ts","../../src/lib/components/login-renderer.component.ts","../../src/lib/strivacity-auth.module.ts","../../src/strivacity-sdk-angular.ts"],"sourcesContent":["import type { LoginFlowMessage, LoginFlowState } from '@strivacity/sdk-core';\nimport { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nexport interface NativeFlowState {\n\tloading: boolean;\n\tformContexts: Record<string, Record<string, unknown>>;\n\tmessageContexts: Record<string, Record<string, string | null>>;\n\tstate: LoginFlowState;\n}\n\n/**\n * Service that manages Strivacity native widgets.\n */\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class StrivacityWidgetService {\n\treadonly loading$ = new BehaviorSubject<boolean>(false);\n\treadonly forms$ = new BehaviorSubject<Record<string, Record<string, unknown>>>({});\n\treadonly messages$ = new BehaviorSubject<Record<string, Record<string, LoginFlowMessage>>>({});\n\treadonly state$ = new BehaviorSubject<LoginFlowState>({});\n\n\ttriggerFallback!: (hostedUrl?: string, message?: string) => void;\n\ttriggerClose!: () => void;\n\tsubmitForm!: (formId: string) => Promise<void>;\n\n\tsetFormValue(formId: string, widgetId: string, value: unknown) {\n\t\tconst forms = { ...this.forms$.value };\n\t\tforms[formId] = { ...(forms[formId] || {}), [widgetId]: value === '' ? null : value };\n\n\t\tthis.forms$.next(forms);\n\t}\n\n\tsetMessage(formId: string, widgetId: string, value: LoginFlowMessage) {\n\t\tconst messages = { ...this.messages$.value };\n\t\tmessages[formId] = { ...(messages[formId] || {}), [widgetId]: value };\n\n\t\tthis.messages$.next(messages);\n\t}\n}\n","import type { Type, SimpleChanges, OnChanges } from '@angular/core';\nimport type { WidgetType, LayoutWidget, Widget } from '@strivacity/sdk-core';\nimport { Component, Input, ViewContainerRef, ViewChild } from '@angular/core';\nimport { StrivacityWidgetService } from '../services/widget.service';\n\n@Component({\n\tstandalone: true,\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'sty-widget-renderer',\n\ttemplate: '<ng-container #container></ng-container>',\n\tstyles: `\n\t\t:host {\n\t\t\tdisplay: contents;\n\t\t}\n\t`,\n})\nexport class StyWidgetRenderer implements OnChanges {\n\t@Input() items: LayoutWidget['items'] = [];\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t@Input({ required: true }) widgets!: Record<WidgetType, Type<any>>;\n\n\t@ViewChild('container', { read: ViewContainerRef, static: true }) readonly $containerRef!: ViewContainerRef;\n\n\tconstructor(protected widgetService: StrivacityWidgetService) {}\n\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tif (changes['items']) {\n\t\t\tthis.render();\n\t\t}\n\t}\n\n\trender(): void {\n\t\tthis.$containerRef.clear();\n\n\t\tif (!this.items) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const item of this.items) {\n\t\t\tif (item.type === 'widget') {\n\t\t\t\tconst form = this.widgetService.state$.value.forms?.find((f) => f.id === item.formId);\n\t\t\t\tconst widget = form?.widgets.find((w) => w.id === item.widgetId);\n\t\t\t\tconst component = widget ? this.widgets[widget.type] : undefined;\n\n\t\t\t\tif (!form || !widget) {\n\t\t\t\t\tthis.widgetService.triggerFallback(undefined, `Unable to find form or widget for item: formId=${item.formId}, widgetId=${item.widgetId}`);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (!component) {\n\t\t\t\t\tthis.widgetService.triggerFallback(undefined, `No component found for widget type ${widget.type}`);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst componentRef = this.$containerRef.createComponent(component);\n\t\t\t\tcomponentRef.setInput('formId', item.formId);\n\t\t\t\tcomponentRef.setInput('config', widget);\n\t\t\t\tcomponentRef.changeDetectorRef.detectChanges();\n\t\t\t} else if (item.type === 'vertical' || item.type === 'horizontal') {\n\t\t\t\tconst component = this.widgets.layout;\n\n\t\t\t\tif (!component) {\n\t\t\t\t\tthis.widgetService.triggerFallback(undefined, 'No layout component provided');\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst widgetRendererRef = this.$containerRef.createComponent(StyWidgetRenderer);\n\t\t\t\twidgetRendererRef.setInput('items', item.items);\n\t\t\t\twidgetRendererRef.setInput('widgets', this.widgets);\n\t\t\t\twidgetRendererRef.changeDetectorRef.detectChanges();\n\n\t\t\t\tconst layoutRef = this.$containerRef.createComponent(component, {\n\t\t\t\t\tprojectableNodes: [[widgetRendererRef.location.nativeElement]],\n\t\t\t\t});\n\t\t\t\tlayoutRef.setInput('formId', (item.items[0] as Widget)?.formId);\n\t\t\t\tlayoutRef.setInput('type', item.type);\n\t\t\t\tlayoutRef.changeDetectorRef.detectChanges();\n\t\t\t} else {\n\t\t\t\tthis.widgetService.triggerFallback(undefined, 'Unknown item type in layout');\n\t\t\t}\n\t\t}\n\t}\n}\n","import { InjectionToken } from '@angular/core';\nimport type { SDKOptions } from '@strivacity/sdk-core';\n\nexport const STRIVACITY_SDK = new InjectionToken<SDKOptions>('sty');\n\n/**\n * Provides the Strivacity SDK configuration as a dependency injection token.\n *\n * This function is used to supply the Strivacity SDK configuration to the application\n * by binding it to the `STRIVACITY_SDK` token.\n *\n * @param {SDKOptions} config The SDK configuration options.\n * @returns {{ provide: InjectionToken<SDKOptions>, useValue: SDKOptions }} An object that provides the SDK configuration using the `STRIVACITY_SDK` token.\n */\nexport function provideStrivacity(config: SDKOptions) {\n\treturn { provide: STRIVACITY_SDK, useValue: config };\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { type Observable, BehaviorSubject, from } from 'rxjs';\nimport type { PopupFlow } from '@strivacity/sdk-core/flows/PopupFlow';\nimport type { RedirectFlow } from '@strivacity/sdk-core/flows/RedirectFlow';\nimport type { NativeFlow } from '@strivacity/sdk-core/flows/NativeFlow';\nimport { type SDKOptions, initFlow } from '@strivacity/sdk-core';\nimport type { Session } from '../utils/types';\nimport { STRIVACITY_SDK } from '../utils/helpers';\n\n/**\n * Service that manages Strivacity authentication flows.\n * Supports either PopupFlow or RedirectFlow types.\n *\n * @template Flow Type of authentication flow (PopupFlow or RedirectFlow).\n * @template Options Type of SDK options (defaults to SDKOptions).\n */\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class StrivacityAuthService<\n\tFlow extends PopupFlow | RedirectFlow | NativeFlow = PopupFlow | RedirectFlow | NativeFlow,\n\tOptions extends SDKOptions = SDKOptions,\n> {\n\t/**\n\t * Instance of the authentication flow (PopupFlow or RedirectFlow).\n\t */\n\tsdk: Flow;\n\n\t/**\n\t * BehaviorSubject that holds the current session state.\n\t * @protected\n\t * @readonly\n\t */\n\tprivate readonly sessionSubject: BehaviorSubject<Session>;\n\n\t/**\n\t * Observable that emits the session state changes.\n\t * @readonly\n\t */\n\treadonly session$: Observable<Session>;\n\n\t/**\n\t * Creates an instance of StrivacityAuthService.\n\t *\n\t * @param {Options} options SDK configuration options injected via STRIVACITY_SDK.\n\t */\n\tconstructor(@Inject(STRIVACITY_SDK) public options: Options) {\n\t\tthis.sdk = initFlow(options) as Flow;\n\t\tthis.sessionSubject = new BehaviorSubject<Session>({\n\t\t\tloading: true,\n\t\t\tisAuthenticated: false,\n\t\t\tidTokenClaims: null,\n\t\t\taccessToken: null,\n\t\t\trefreshToken: null,\n\t\t\taccessTokenExpired: true,\n\t\t\taccessTokenExpirationDate: null,\n\t\t});\n\t\tthis.session$ = this.sessionSubject.asObservable();\n\n\t\tconst updateSession = async () => {\n\t\t\tthis.sessionSubject.next({\n\t\t\t\tloading: false,\n\t\t\t\tisAuthenticated: await this.sdk.isAuthenticated,\n\t\t\t\tidTokenClaims: this.sdk.idTokenClaims || null,\n\t\t\t\taccessToken: this.sdk.accessToken || null,\n\t\t\t\trefreshToken: this.sdk.refreshToken || null,\n\t\t\t\taccessTokenExpired: this.sdk.accessTokenExpired,\n\t\t\t\taccessTokenExpirationDate: this.sdk.accessTokenExpirationDate || null,\n\t\t\t});\n\t\t};\n\n\t\tthis.sdk.subscribeToEvent('init', updateSession);\n\t\tthis.sdk.subscribeToEvent('loggedIn', updateSession);\n\t\tthis.sdk.subscribeToEvent('sessionLoaded', updateSession);\n\t\tthis.sdk.subscribeToEvent('tokenRefreshed', updateSession);\n\t\tthis.sdk.subscribeToEvent('tokenRefreshFailed', updateSession);\n\t\tthis.sdk.subscribeToEvent('logoutInitiated', updateSession);\n\t\tthis.sdk.subscribeToEvent('tokenRevoked', updateSession);\n\t\tthis.sdk.subscribeToEvent('tokenRevokeFailed', updateSession);\n\t}\n\n\t/**\n\t * Checks if the user is authenticated.\n\t *\n\t * @returns {Observable<boolean>} An observable that emits the authentication status.\n\t */\n\tisAuthenticated() {\n\t\treturn from(this.sdk.isAuthenticated);\n\t}\n\n\t/**\n\t * Logs the user in using the specified options.\n\t *\n\t * @param {Parameters<Flow['login']>[0]} [options] Options to customize the login behavior.\n\t * @returns {Observable<void>} An observable that completes when the login process is done.\n\t */\n\tlogin(options?: Parameters<Flow['login']>[0]) {\n\t\tconst result = this.sdk.login(options);\n\n\t\tif (result instanceof Promise) {\n\t\t\treturn from(result);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Initiates the entry process using the provided challenge.\n\t *\n\t * @param {string} [url] Optional URL to use for the entry process. If not provided, the current window location will be used.\n\t * @returns {Observable<void>} An observable that completes when the entry process is done.\n\t */\n\tentry(url?: string) {\n\t\tconst result = this.sdk.entry(url);\n\n\t\tif (result instanceof Promise) {\n\t\t\treturn from(result);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Registers a new user using the specified options.\n\t *\n\t * @param {Parameters<Flow['register']>[0]} [options] Options to customize the registration behavior.\n\t * @returns {Observable<void>} An observable that completes when the registration process is done.\n\t */\n\tregister(options?: Parameters<Flow['register']>[0]) {\n\t\tconst result = this.sdk.register(options);\n\n\t\tif (result instanceof Promise) {\n\t\t\treturn from(result);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Refreshes the current authentication session.\n\t *\n\t * @returns {Observable<void>} An observable that completes when the session is refreshed.\n\t */\n\trefresh() {\n\t\treturn from(this.sdk.refresh());\n\t}\n\n\t/**\n\t * Revokes the current session tokens.\n\t *\n\t * @returns {Observable<void>} An observable that completes when the tokens are revoked.\n\t */\n\trevoke() {\n\t\treturn from(this.sdk.revoke());\n\t}\n\n\t/**\n\t * Logs the user out using the specified options.\n\t *\n\t * @param {Parameters<Flow['logout']>[0]} [options] Options to customize the logout behavior.\n\t * @returns {Observable<void>} An observable that completes when the logout process is done.\n\t */\n\tlogout(options?: Parameters<Flow['logout']>[0]) {\n\t\treturn from(this.sdk.logout(options));\n\t}\n\n\t/**\n\t * Handles the authentication callback (e.g., after a redirect or popup flow).\n\t *\n\t * @param {Parameters<Flow['handleCallback']>[0]} [url] The URL to handle for the callback.\n\t * @returns {Observable<void>} An observable that completes when the callback is handled.\n\t */\n\thandleCallback(url?: Parameters<Flow['handleCallback']>[0]) {\n\t\treturn from(this.sdk.handleCallback(url));\n\t}\n}\n","import type { OnInit, OnDestroy, ComponentRef } from '@angular/core';\nimport type { NativeFlow } from '@strivacity/sdk-core/flows/NativeFlow';\nimport type { IdTokenClaims, NativeParams, WidgetType, LoginFlowState, LoginFlowMessage, Widget } from '@strivacity/sdk-core';\nimport { Component, EventEmitter, Input, Output, Type, ViewChild, ViewContainerRef } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { FallbackError } from '@strivacity/sdk-core';\nimport { StrivacityAuthService } from '../services/auth.service';\nimport { StrivacityWidgetService } from '../services/widget.service';\nimport { unflattenObject } from '@strivacity/sdk-core/utils/object';\nimport { StyWidgetRenderer } from './widget-renderer.component';\n\n@Component({\n\tstandalone: true,\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'sty-login-renderer',\n\ttemplate: '<ng-container #container></ng-container>',\n\thost: {\n\t\tclass: 'login-renderer',\n\t},\n})\nexport class StyLoginRenderer implements OnInit, OnDestroy {\n\tprivate subscriptions = new Subscription();\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tprivate createdComponentRefs: ComponentRef<any>[] = [];\n\tloginHandler!: ReturnType<StrivacityAuthService<NativeFlow>['sdk']['login']>;\n\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t@Input({ required: true }) widgets!: Record<WidgetType, Type<any>>;\n\t@Input() sessionId?: string | null;\n\t@Input() language?: string | null;\n\t@Input() params: NativeParams = {};\n\n\t@Output('login') readonly onLogin = new EventEmitter<IdTokenClaims | null | undefined>();\n\t@Output('fallback') readonly onFallback = new EventEmitter<FallbackError>();\n\t@Output('close') readonly onClose = new EventEmitter();\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t@Output('error') readonly onError = new EventEmitter<any>();\n\t@Output('globalMessage') readonly onGlobalMessage = new EventEmitter<string>();\n\t@Output('blockReady') readonly onBlockReady = new EventEmitter<{ previousState: LoginFlowState; state: LoginFlowState }>();\n\t@Output('languageChange') readonly onLanguageChange = new EventEmitter<string | null>();\n\n\t@ViewChild('container', { read: ViewContainerRef, static: true }) readonly $containerRef!: ViewContainerRef;\n\n\tconstructor(\n\t\tprotected authService: StrivacityAuthService<NativeFlow>,\n\t\tprotected widgetService: StrivacityWidgetService,\n\t) {\n\t\tthis.widgetService.triggerFallback = (hostedUrl?: string, message?: string) => {\n\t\t\tconst url = hostedUrl || this.widgetService.state$.value.hostedUrl;\n\n\t\t\tthis.authService.sdk.logging?.warn(message ? `Triggering fallback due to: ${message}` : 'Triggering fallback');\n\n\t\t\tif (!url) {\n\t\t\t\tconst error = new Error('No hosted URL provided');\n\t\t\t\tthis.authService.sdk.logging?.error('Fallback error', error);\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\tthis.onFallback.emit(new FallbackError(new URL(url)));\n\t\t};\n\t\tthis.widgetService.triggerClose = () => {\n\t\t\tthis.onClose.emit();\n\t\t};\n\t\tthis.widgetService.submitForm = async (formId: string) => {\n\t\t\ttry {\n\t\t\t\tthis.widgetService.loading$.next(true);\n\n\t\t\t\tconst data = await this.loginHandler.submitForm(formId, unflattenObject(this.widgetService.forms$.value[formId]));\n\n\t\t\t\tif (await this.authService.sdk.isAuthenticated) {\n\t\t\t\t\tthis.onLogin.emit(this.authService.sdk.idTokenClaims);\n\t\t\t\t} else {\n\t\t\t\t\tconst previousState = JSON.parse(JSON.stringify(this.widgetService.state$.value));\n\t\t\t\t\tconst newState: LoginFlowState = {\n\t\t\t\t\t\thostedUrl: data?.hostedUrl ?? this.widgetService.state$.value.hostedUrl,\n\t\t\t\t\t\tfinalizeUrl: data?.finalizeUrl ?? this.widgetService.state$.value.finalizeUrl,\n\t\t\t\t\t\tscreen: data?.screen ?? this.widgetService.state$.value.screen,\n\t\t\t\t\t\tforms: data?.forms ?? this.widgetService.state$.value.forms,\n\t\t\t\t\t\tlayout: data?.layout ?? this.widgetService.state$.value.layout,\n\t\t\t\t\t\tmessages: data?.messages ?? {},\n\t\t\t\t\t\tbranding: data?.branding ?? this.widgetService.state$.value.branding,\n\t\t\t\t\t};\n\n\t\t\t\t\tif (newState.screen !== this.widgetService.state$.value.screen) {\n\t\t\t\t\t\tconst forms: Record<string, Record<string, unknown>> = {};\n\t\t\t\t\t\tconst messages: Record<string, Record<string, LoginFlowMessage>> = {};\n\n\t\t\t\t\t\tfor (const form of newState.forms ?? []) {\n\t\t\t\t\t\t\tforms[form.id] = {};\n\t\t\t\t\t\t\tmessages[form.id] = {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.widgetService.forms$.next(forms);\n\t\t\t\t\t\tthis.widgetService.messages$.next(messages);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.authService.sdk.logging?.info(`Updating screen: ${newState.screen}`);\n\t\t\t\t\t}\n\n\t\t\t\t\tObject.keys(newState.messages ?? {}).forEach((formId) => {\n\t\t\t\t\t\tif (formId === 'global') {\n\t\t\t\t\t\t\tthis.onGlobalMessage.emit(newState.messages?.global?.text ?? '');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst messages = { ...this.widgetService.messages$.value };\n\t\t\t\t\t\t\tmessages[formId] = newState.messages![formId];\n\t\t\t\t\t\t\tthis.widgetService.messages$.next(messages);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tthis.widgetService.state$.next(newState);\n\t\t\t\t\tthis.onBlockReady.emit({ previousState, state: structuredClone(newState) });\n\t\t\t\t\tthis.widgetService.loading$.next(false);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof FallbackError) {\n\t\t\t\t\tthis.onFallback.emit(error);\n\t\t\t\t} else {\n\t\t\t\t\tthis.onError.emit(error);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\n\tngOnInit() {\n\t\tthis.subscriptions.add(\n\t\t\tthis.widgetService.state$.subscribe((state) => {\n\t\t\t\tthis.render(state);\n\t\t\t}),\n\t\t);\n\t\tvoid this.init();\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.subscriptions.unsubscribe();\n\t\tthis.clearAndDestroyComponents();\n\t\tthis.widgetService.loading$.next(false);\n\t\tthis.widgetService.state$.next({});\n\t\tthis.widgetService.forms$.next({});\n\t\tthis.widgetService.messages$.next({});\n\t}\n\n\tasync init() {\n\t\ttry {\n\t\t\tthis.loginHandler = this.authService.sdk.login(this.params);\n\n\t\t\tconst data = (await this.loginHandler.startSession(this.sessionId, this.language)) as LoginFlowState;\n\t\t\tconst previousState = JSON.parse(JSON.stringify(this.widgetService.state$.value));\n\t\t\tconst newState = {\n\t\t\t\thostedUrl: data?.hostedUrl ?? this.widgetService.state$.value.hostedUrl,\n\t\t\t\tfinalizeUrl: data?.finalizeUrl ?? this.widgetService.state$.value.finalizeUrl,\n\t\t\t\tscreen: data?.screen ?? this.widgetService.state$.value.screen,\n\t\t\t\tforms: data?.forms ?? this.widgetService.state$.value.forms,\n\t\t\t\tlayout: data?.layout ?? this.widgetService.state$.value.layout,\n\t\t\t\tmessages: data?.messages ?? {},\n\t\t\t\tbranding: data?.branding ?? this.widgetService.state$.value.branding,\n\t\t\t};\n\n\t\t\tthis.onLanguageChange.emit(this.loginHandler.language);\n\n\t\t\tif (await this.authService.sdk.isAuthenticated) {\n\t\t\t\tthis.onLogin.emit(this.authService.sdk.idTokenClaims);\n\t\t\t} else {\n\t\t\t\tif (newState.screen !== this.widgetService.state$.value.screen) {\n\t\t\t\t\tconst newFormContexts: Record<string, Record<string, unknown>> = {};\n\t\t\t\t\tconst newMessageContexts: Record<string, Record<string, LoginFlowMessage>> = {};\n\n\t\t\t\t\tfor (const form of newState.forms ?? []) {\n\t\t\t\t\t\tnewFormContexts[form.id] = {};\n\t\t\t\t\t\tnewMessageContexts[form.id] = {};\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.widgetService.forms$.next(newFormContexts);\n\t\t\t\t\tthis.widgetService.messages$.next(newMessageContexts);\n\t\t\t\t}\n\n\t\t\t\tObject.keys(newState.messages ?? {}).forEach((formId) => {\n\t\t\t\t\tif (formId === 'global') {\n\t\t\t\t\t\tthis.onGlobalMessage.emit(newState.messages?.global?.text ?? '');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst messages = { ...this.widgetService.messages$.value };\n\t\t\t\t\t\tmessages[formId] = newState.messages[formId];\n\n\t\t\t\t\t\tthis.widgetService.messages$.next(messages);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tthis.widgetService.state$.next(newState);\n\t\t\t\tthis.onBlockReady.emit({ previousState, state: structuredClone(newState) });\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (error instanceof FallbackError) {\n\t\t\t\tthis.onFallback.emit(error);\n\t\t\t} else {\n\t\t\t\tthis.onError.emit(error);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate render(state: LoginFlowState): void {\n\t\tthis.clearAndDestroyComponents();\n\n\t\tif (state.screen) {\n\t\t\tconst component = this.widgets['layout'];\n\n\t\t\tif (!component) {\n\t\t\t\tthis.widgetService.triggerFallback(undefined, 'No layout component provided');\n\t\t\t}\n\n\t\t\tconst widgetRendererRef = this.$containerRef.createComponent(StyWidgetRenderer);\n\t\t\twidgetRendererRef.setInput('items', state.layout?.items);\n\t\t\twidgetRendererRef.setInput('widgets', this.widgets);\n\t\t\twidgetRendererRef.changeDetectorRef.detectChanges();\n\n\t\t\tconst layoutRef = this.$containerRef.createComponent(component, {\n\t\t\t\tprojectableNodes: [[widgetRendererRef.location.nativeElement]],\n\t\t\t});\n\t\t\tlayoutRef.setInput('formId', (state.layout?.items[0] as Widget)?.formId);\n\t\t\tlayoutRef.setInput('type', state.layout?.type);\n\t\t\tlayoutRef.setInput('tag', 'form');\n\t\t\tlayoutRef.changeDetectorRef.detectChanges();\n\n\t\t\tthis.createdComponentRefs.push(widgetRendererRef, layoutRef);\n\t\t} else {\n\t\t\tconst loadingComponentType = this.widgets['loading'];\n\n\t\t\tif (loadingComponentType) {\n\t\t\t\tconst loadingRef = this.$containerRef.createComponent(loadingComponentType);\n\n\t\t\t\tthis.createdComponentRefs.push(loadingRef);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate clearAndDestroyComponents(): void {\n\t\tthis.createdComponentRefs.forEach((ref) => {\n\t\t\tif (!ref.hostView.destroyed) {\n\t\t\t\tref.destroy();\n\t\t\t}\n\t\t});\n\t\tthis.createdComponentRefs = [];\n\t\tthis.$containerRef?.clear();\n\t}\n}\n","import { type ModuleWithProviders, CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport type { SDKOptions } from '@strivacity/sdk-core';\nimport { StrivacityAuthService } from './services/auth.service';\nimport { provideStrivacity } from './utils/helpers';\nimport { StyLoginRenderer } from './components/login-renderer.component';\n\n@NgModule({\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\tproviders: [StrivacityAuthService],\n\timports: [StyLoginRenderer],\n\texports: [StyLoginRenderer],\n})\nexport class StrivacityAuthModule {\n\tstatic forRoot(options: SDKOptions): ModuleWithProviders<StrivacityAuthModule> {\n\t\treturn {\n\t\t\tngModule: StrivacityAuthModule,\n\t\t\tproviders: [provideStrivacity(options)],\n\t\t};\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.StrivacityWidgetService","i1.StrivacityAuthService","i2.StrivacityWidgetService"],"mappings":";;;;;;;;;;;;;AAWA;;AAEG;MAIU,uBAAuB,CAAA;AAC1B,IAAA,QAAQ,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC;AAC9C,IAAA,MAAM,GAAG,IAAI,eAAe,CAA0C,EAAE,CAAC;AACzE,IAAA,SAAS,GAAG,IAAI,eAAe,CAAmD,EAAE,CAAC;AACrF,IAAA,MAAM,GAAG,IAAI,eAAe,CAAiB,EAAE,CAAC;AAEzD,IAAA,eAAe;AACf,IAAA,YAAY;AACZ,IAAA,UAAU;AAEV,IAAA,YAAY,CAAC,MAAc,EAAE,QAAgB,EAAE,KAAc,EAAA;QAC5D,MAAM,KAAK,GAAG,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;AACtC,QAAA,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,QAAQ,GAAG,KAAK,KAAK,EAAE,GAAG,IAAI,GAAG,KAAK,EAAE;AAErF,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;IACxB;AAEA,IAAA,UAAU,CAAC,MAAc,EAAE,QAAgB,EAAE,KAAuB,EAAA;QACnE,MAAM,QAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;QAC5C,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,QAAQ,GAAG,KAAK,EAAE;AAErE,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC9B;wGAtBY,uBAAuB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AA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAApB,oBAAoB,EAAA,OAAA,EAAA,CAHtB,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAChB,gBAAgB,CAAA,EAAA,CAAA;yGAEd,oBAAoB,EAAA,SAAA,EAJrB,CAAC,qBAAqB,CAAC,EAAA,CAAA;;4FAItB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,SAAS,EAAE,CAAC,qBAAqB,CAAC;oBAClC,OAAO,EAAE,CAAC,gBAAgB,CAAC;oBAC3B,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -14,6 +14,7 @@ export declare class StyLoginRenderer implements OnInit, OnDestroy {
|
|
|
14
14
|
loginHandler: ReturnType<StrivacityAuthService<NativeFlow>['sdk']['login']>;
|
|
15
15
|
widgets: Record<WidgetType, Type<any>>;
|
|
16
16
|
sessionId?: string | null;
|
|
17
|
+
language?: string | null;
|
|
17
18
|
params: NativeParams;
|
|
18
19
|
readonly onLogin: EventEmitter<IdTokenClaims>;
|
|
19
20
|
readonly onFallback: EventEmitter<FallbackError>;
|
|
@@ -24,6 +25,7 @@ export declare class StyLoginRenderer implements OnInit, OnDestroy {
|
|
|
24
25
|
previousState: LoginFlowState;
|
|
25
26
|
state: LoginFlowState;
|
|
26
27
|
}>;
|
|
28
|
+
readonly onLanguageChange: EventEmitter<string>;
|
|
27
29
|
readonly $containerRef: ViewContainerRef;
|
|
28
30
|
constructor(authService: StrivacityAuthService<NativeFlow>, widgetService: StrivacityWidgetService);
|
|
29
31
|
ngOnInit(): void;
|
|
@@ -32,5 +34,5 @@ export declare class StyLoginRenderer implements OnInit, OnDestroy {
|
|
|
32
34
|
private render;
|
|
33
35
|
private clearAndDestroyComponents;
|
|
34
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<StyLoginRenderer, never>;
|
|
35
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StyLoginRenderer, "sty-login-renderer", never, { "widgets": { "alias": "widgets"; "required": true; }; "sessionId": { "alias": "sessionId"; "required": false; }; "params": { "alias": "params"; "required": false; }; }, { "onLogin": "login"; "onFallback": "fallback"; "onClose": "close"; "onError": "error"; "onGlobalMessage": "globalMessage"; "onBlockReady": "blockReady"; }, never, never, true, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StyLoginRenderer, "sty-login-renderer", never, { "widgets": { "alias": "widgets"; "required": true; }; "sessionId": { "alias": "sessionId"; "required": false; }; "language": { "alias": "language"; "required": false; }; "params": { "alias": "params"; "required": false; }; }, { "onLogin": "login"; "onFallback": "fallback"; "onClose": "close"; "onError": "error"; "onGlobalMessage": "globalMessage"; "onBlockReady": "blockReady"; "onLanguageChange": "languageChange"; }, never, never, true, never>;
|
|
36
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strivacity/sdk-angular",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Strivacity Angular SDK client",
|
|
6
6
|
"author": "strivacity <opensource@strivacity.com>",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@strivacity/sdk-core": "3.0.
|
|
13
|
+
"@strivacity/sdk-core": "3.0.2"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@angular/core": ">=14"
|