@strivacity/sdk-angular 2.1.1 → 2.3.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 +22 -0
- package/README.md +117 -0
- package/dist/README.md +117 -0
- package/dist/fesm2022/strivacity-sdk-angular.mjs +20 -10
- package/dist/fesm2022/strivacity-sdk-angular.mjs.map +1 -1
- package/dist/lib/components/login-renderer.component.d.ts +0 -1
- package/dist/lib/services/widget.service.d.ts +1 -1
- package/dist/public-api.d.ts +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## 2.3.0 (2026-02-10)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated sdk-core to 2.3.0
|
|
6
|
+
- Updated testing to 2.2.0
|
|
7
|
+
|
|
8
|
+
## 2.2.0 (2026-02-06)
|
|
9
|
+
|
|
10
|
+
### 🚀 Features
|
|
11
|
+
|
|
12
|
+
- logging implemented ([032dc8a](https://github.com/Strivacity/sdk-js/commit/032dc8a))
|
|
13
|
+
|
|
14
|
+
### 🩹 Fixes
|
|
15
|
+
|
|
16
|
+
- error message rendering fixed ([9e67051](https://github.com/Strivacity/sdk-js/commit/9e67051))
|
|
17
|
+
|
|
18
|
+
### 🧱 Updated Dependencies
|
|
19
|
+
|
|
20
|
+
- Updated sdk-core to 2.2.0
|
|
21
|
+
- Updated testing to 2.2.0
|
|
22
|
+
|
|
1
23
|
## 2.1.1 (2026-01-13)
|
|
2
24
|
|
|
3
25
|
### 🧱 Updated Dependencies
|
package/README.md
CHANGED
|
@@ -596,6 +596,123 @@ Same as the profile page example in redirect mode.
|
|
|
596
596
|
|
|
597
597
|
Same as the logout page example in redirect mode.
|
|
598
598
|
|
|
599
|
+
## Logging
|
|
600
|
+
|
|
601
|
+
The SDK supports optional logging to help you debug authentication flows and monitor SDK behavior. You can enable the built-in console logger or provide your own custom logger implementation.
|
|
602
|
+
|
|
603
|
+
### Using the Default Logger
|
|
604
|
+
|
|
605
|
+
Enable the default console logger by adding the `logging` option when configuring the SDK:
|
|
606
|
+
|
|
607
|
+
#### NgModule Configuration
|
|
608
|
+
|
|
609
|
+
```typescript
|
|
610
|
+
import { NgModule } from '@angular/core';
|
|
611
|
+
import { StrivacityAuthModule } from '@strivacity/sdk-angular';
|
|
612
|
+
import { DefaultLogging } from '@strivacity/sdk-core';
|
|
613
|
+
|
|
614
|
+
@NgModule({
|
|
615
|
+
declarations: [AppComponent],
|
|
616
|
+
imports: [
|
|
617
|
+
...StrivacityAuthModule.forRoot({
|
|
618
|
+
mode: 'redirect',
|
|
619
|
+
issuer: 'https://<YOUR_DOMAIN>',
|
|
620
|
+
scopes: ['openid', 'profile'],
|
|
621
|
+
clientId: '<YOUR_CLIENT_ID>',
|
|
622
|
+
redirectUri: '<YOUR_REDIRECT_URI>',
|
|
623
|
+
logging: DefaultLogging, // Enable built-in console logging
|
|
624
|
+
}),
|
|
625
|
+
],
|
|
626
|
+
bootstrap: [AppComponent],
|
|
627
|
+
})
|
|
628
|
+
export class AppModule {}
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
#### Standalone Configuration
|
|
632
|
+
|
|
633
|
+
```typescript
|
|
634
|
+
import { ApplicationConfig } from '@angular/core';
|
|
635
|
+
import { provideStrivacity } from '@strivacity/sdk-angular';
|
|
636
|
+
import { DefaultLogging } from '@strivacity/sdk-core';
|
|
637
|
+
|
|
638
|
+
export const appConfig: ApplicationConfig = {
|
|
639
|
+
providers: [
|
|
640
|
+
...provideStrivacity({
|
|
641
|
+
mode: 'redirect',
|
|
642
|
+
issuer: 'https://<YOUR_DOMAIN>',
|
|
643
|
+
scopes: ['openid', 'profile'],
|
|
644
|
+
clientId: '<YOUR_CLIENT_ID>',
|
|
645
|
+
redirectUri: '<YOUR_REDIRECT_URI>',
|
|
646
|
+
logging: DefaultLogging, // Enable built-in console logging
|
|
647
|
+
}),
|
|
648
|
+
],
|
|
649
|
+
};
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
The default logger writes to the browser console and automatically prefixes messages with a correlation ID when available (via the `xEventId` property).
|
|
653
|
+
|
|
654
|
+
### Creating a Custom Logger
|
|
655
|
+
|
|
656
|
+
You can provide your own logger by implementing the `SDKLogging` interface with four methods: `debug`, `info`, `warn`, and `error`. An optional `xEventId` property is honored for log correlation.
|
|
657
|
+
|
|
658
|
+
```typescript
|
|
659
|
+
import type { SDKLogging } from '@strivacity/sdk-angular';
|
|
660
|
+
|
|
661
|
+
export class MyLogger implements SDKLogging {
|
|
662
|
+
xEventId?: string;
|
|
663
|
+
|
|
664
|
+
debug(message: string): void {
|
|
665
|
+
// Send to your logging pipeline
|
|
666
|
+
console.debug(this.xEventId ? `[${this.xEventId}] ${message}` : message);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
info(message: string): void {
|
|
670
|
+
console.info(this.xEventId ? `[${this.xEventId}] ${message}` : message);
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
warn(message: string): void {
|
|
674
|
+
console.warn(this.xEventId ? `[${this.xEventId}] ${message}` : message);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
error(message: string, error: Error): void {
|
|
678
|
+
console.error(this.xEventId ? `[${this.xEventId}] ${message}` : message, error);
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
```
|
|
682
|
+
|
|
683
|
+
Then register your custom logger when configuring the SDK:
|
|
684
|
+
|
|
685
|
+
#### Standalone Configuration
|
|
686
|
+
|
|
687
|
+
```typescript
|
|
688
|
+
import { provideStrivacity } from '@strivacity/sdk-angular';
|
|
689
|
+
import { MyLogger } from './logging/MyLogger';
|
|
690
|
+
|
|
691
|
+
export const appConfig: ApplicationConfig = {
|
|
692
|
+
providers: [
|
|
693
|
+
...provideStrivacity({
|
|
694
|
+
mode: 'redirect',
|
|
695
|
+
issuer: 'https://<YOUR_DOMAIN>',
|
|
696
|
+
scopes: ['openid', 'profile'],
|
|
697
|
+
clientId: '<YOUR_CLIENT_ID>',
|
|
698
|
+
redirectUri: '<YOUR_REDIRECT_URI>',
|
|
699
|
+
logging: MyLogger, // Use your custom logger
|
|
700
|
+
}),
|
|
701
|
+
],
|
|
702
|
+
};
|
|
703
|
+
```
|
|
704
|
+
|
|
705
|
+
### Logger Interface
|
|
706
|
+
|
|
707
|
+
The `SDKLogging` interface requires the following methods:
|
|
708
|
+
|
|
709
|
+
- **`debug(message: string): void`** - Log debug-level messages
|
|
710
|
+
- **`info(message: string): void`** - Log informational messages
|
|
711
|
+
- **`warn(message: string): void`** - Log warning messages
|
|
712
|
+
- **`error(message: string, error: Error): void`** - Log error messages with error objects
|
|
713
|
+
|
|
714
|
+
The optional `xEventId` property, when set by the SDK, provides a correlation ID to trace related log messages across the authentication flow.
|
|
715
|
+
|
|
599
716
|
## API Documentation
|
|
600
717
|
|
|
601
718
|
#### `StrivacityAuthService`
|
package/dist/README.md
CHANGED
|
@@ -596,6 +596,123 @@ Same as the profile page example in redirect mode.
|
|
|
596
596
|
|
|
597
597
|
Same as the logout page example in redirect mode.
|
|
598
598
|
|
|
599
|
+
## Logging
|
|
600
|
+
|
|
601
|
+
The SDK supports optional logging to help you debug authentication flows and monitor SDK behavior. You can enable the built-in console logger or provide your own custom logger implementation.
|
|
602
|
+
|
|
603
|
+
### Using the Default Logger
|
|
604
|
+
|
|
605
|
+
Enable the default console logger by adding the `logging` option when configuring the SDK:
|
|
606
|
+
|
|
607
|
+
#### NgModule Configuration
|
|
608
|
+
|
|
609
|
+
```typescript
|
|
610
|
+
import { NgModule } from '@angular/core';
|
|
611
|
+
import { StrivacityAuthModule } from '@strivacity/sdk-angular';
|
|
612
|
+
import { DefaultLogging } from '@strivacity/sdk-core';
|
|
613
|
+
|
|
614
|
+
@NgModule({
|
|
615
|
+
declarations: [AppComponent],
|
|
616
|
+
imports: [
|
|
617
|
+
...StrivacityAuthModule.forRoot({
|
|
618
|
+
mode: 'redirect',
|
|
619
|
+
issuer: 'https://<YOUR_DOMAIN>',
|
|
620
|
+
scopes: ['openid', 'profile'],
|
|
621
|
+
clientId: '<YOUR_CLIENT_ID>',
|
|
622
|
+
redirectUri: '<YOUR_REDIRECT_URI>',
|
|
623
|
+
logging: DefaultLogging, // Enable built-in console logging
|
|
624
|
+
}),
|
|
625
|
+
],
|
|
626
|
+
bootstrap: [AppComponent],
|
|
627
|
+
})
|
|
628
|
+
export class AppModule {}
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
#### Standalone Configuration
|
|
632
|
+
|
|
633
|
+
```typescript
|
|
634
|
+
import { ApplicationConfig } from '@angular/core';
|
|
635
|
+
import { provideStrivacity } from '@strivacity/sdk-angular';
|
|
636
|
+
import { DefaultLogging } from '@strivacity/sdk-core';
|
|
637
|
+
|
|
638
|
+
export const appConfig: ApplicationConfig = {
|
|
639
|
+
providers: [
|
|
640
|
+
...provideStrivacity({
|
|
641
|
+
mode: 'redirect',
|
|
642
|
+
issuer: 'https://<YOUR_DOMAIN>',
|
|
643
|
+
scopes: ['openid', 'profile'],
|
|
644
|
+
clientId: '<YOUR_CLIENT_ID>',
|
|
645
|
+
redirectUri: '<YOUR_REDIRECT_URI>',
|
|
646
|
+
logging: DefaultLogging, // Enable built-in console logging
|
|
647
|
+
}),
|
|
648
|
+
],
|
|
649
|
+
};
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
The default logger writes to the browser console and automatically prefixes messages with a correlation ID when available (via the `xEventId` property).
|
|
653
|
+
|
|
654
|
+
### Creating a Custom Logger
|
|
655
|
+
|
|
656
|
+
You can provide your own logger by implementing the `SDKLogging` interface with four methods: `debug`, `info`, `warn`, and `error`. An optional `xEventId` property is honored for log correlation.
|
|
657
|
+
|
|
658
|
+
```typescript
|
|
659
|
+
import type { SDKLogging } from '@strivacity/sdk-angular';
|
|
660
|
+
|
|
661
|
+
export class MyLogger implements SDKLogging {
|
|
662
|
+
xEventId?: string;
|
|
663
|
+
|
|
664
|
+
debug(message: string): void {
|
|
665
|
+
// Send to your logging pipeline
|
|
666
|
+
console.debug(this.xEventId ? `[${this.xEventId}] ${message}` : message);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
info(message: string): void {
|
|
670
|
+
console.info(this.xEventId ? `[${this.xEventId}] ${message}` : message);
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
warn(message: string): void {
|
|
674
|
+
console.warn(this.xEventId ? `[${this.xEventId}] ${message}` : message);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
error(message: string, error: Error): void {
|
|
678
|
+
console.error(this.xEventId ? `[${this.xEventId}] ${message}` : message, error);
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
```
|
|
682
|
+
|
|
683
|
+
Then register your custom logger when configuring the SDK:
|
|
684
|
+
|
|
685
|
+
#### Standalone Configuration
|
|
686
|
+
|
|
687
|
+
```typescript
|
|
688
|
+
import { provideStrivacity } from '@strivacity/sdk-angular';
|
|
689
|
+
import { MyLogger } from './logging/MyLogger';
|
|
690
|
+
|
|
691
|
+
export const appConfig: ApplicationConfig = {
|
|
692
|
+
providers: [
|
|
693
|
+
...provideStrivacity({
|
|
694
|
+
mode: 'redirect',
|
|
695
|
+
issuer: 'https://<YOUR_DOMAIN>',
|
|
696
|
+
scopes: ['openid', 'profile'],
|
|
697
|
+
clientId: '<YOUR_CLIENT_ID>',
|
|
698
|
+
redirectUri: '<YOUR_REDIRECT_URI>',
|
|
699
|
+
logging: MyLogger, // Use your custom logger
|
|
700
|
+
}),
|
|
701
|
+
],
|
|
702
|
+
};
|
|
703
|
+
```
|
|
704
|
+
|
|
705
|
+
### Logger Interface
|
|
706
|
+
|
|
707
|
+
The `SDKLogging` interface requires the following methods:
|
|
708
|
+
|
|
709
|
+
- **`debug(message: string): void`** - Log debug-level messages
|
|
710
|
+
- **`info(message: string): void`** - Log informational messages
|
|
711
|
+
- **`warn(message: string): void`** - Log warning messages
|
|
712
|
+
- **`error(message: string, error: Error): void`** - Log error messages with error objects
|
|
713
|
+
|
|
714
|
+
The optional `xEventId` property, when set by the SDK, provides a correlation ID to trace related log messages across the authentication flow.
|
|
715
|
+
|
|
599
716
|
## API Documentation
|
|
600
717
|
|
|
601
718
|
#### `StrivacityAuthService`
|
|
@@ -2,6 +2,7 @@ import { initFlow, FallbackError } from '@strivacity/sdk-core';
|
|
|
2
2
|
export * from '@strivacity/sdk-core';
|
|
3
3
|
export { SDKStorage } from '@strivacity/sdk-core';
|
|
4
4
|
export { HttpClient } from '@strivacity/sdk-core/utils/HttpClient';
|
|
5
|
+
export { DefaultLogging } from '@strivacity/sdk-core/utils/Logging';
|
|
5
6
|
export { LocalStorage } from '@strivacity/sdk-core/storages/LocalStorage';
|
|
6
7
|
export { SessionStorage } from '@strivacity/sdk-core/storages/SessionStorage';
|
|
7
8
|
export { createCredential, getCredential } from '@strivacity/sdk-core/utils/credentials';
|
|
@@ -65,8 +66,12 @@ class StyWidgetRenderer {
|
|
|
65
66
|
const form = this.widgetService.state$.value.forms?.find((f) => f.id === item.formId);
|
|
66
67
|
const widget = form?.widgets.find((w) => w.id === item.widgetId);
|
|
67
68
|
const component = widget ? this.widgets[widget.type] : undefined;
|
|
68
|
-
if (!form || !widget
|
|
69
|
-
this.widgetService.triggerFallback();
|
|
69
|
+
if (!form || !widget) {
|
|
70
|
+
this.widgetService.triggerFallback(undefined, `Unable to find form or widget for item: formId=${item.formId}, widgetId=${item.widgetId}`);
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
if (!component) {
|
|
74
|
+
this.widgetService.triggerFallback(undefined, `No component found for widget type ${widget.type}`);
|
|
70
75
|
continue;
|
|
71
76
|
}
|
|
72
77
|
const componentRef = this.$containerRef.createComponent(component);
|
|
@@ -77,7 +82,7 @@ class StyWidgetRenderer {
|
|
|
77
82
|
else if (item.type === 'vertical' || item.type === 'horizontal') {
|
|
78
83
|
const component = this.widgets.layout;
|
|
79
84
|
if (!component) {
|
|
80
|
-
this.widgetService.triggerFallback();
|
|
85
|
+
this.widgetService.triggerFallback(undefined, 'No layout component provided');
|
|
81
86
|
continue;
|
|
82
87
|
}
|
|
83
88
|
const widgetRendererRef = this.$containerRef.createComponent(StyWidgetRenderer);
|
|
@@ -92,7 +97,7 @@ class StyWidgetRenderer {
|
|
|
92
97
|
layoutRef.changeDetectorRef.detectChanges();
|
|
93
98
|
}
|
|
94
99
|
else {
|
|
95
|
-
this.widgetService.triggerFallback();
|
|
100
|
+
this.widgetService.triggerFallback(undefined, 'Unknown item type in layout');
|
|
96
101
|
}
|
|
97
102
|
}
|
|
98
103
|
}
|
|
@@ -286,7 +291,6 @@ class StyLoginRenderer {
|
|
|
286
291
|
authService;
|
|
287
292
|
widgetService;
|
|
288
293
|
subscriptions = new Subscription();
|
|
289
|
-
stateSub;
|
|
290
294
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
291
295
|
createdComponentRefs = [];
|
|
292
296
|
loginHandler;
|
|
@@ -305,10 +309,13 @@ class StyLoginRenderer {
|
|
|
305
309
|
constructor(authService, widgetService) {
|
|
306
310
|
this.authService = authService;
|
|
307
311
|
this.widgetService = widgetService;
|
|
308
|
-
this.widgetService.triggerFallback = (hostedUrl) => {
|
|
312
|
+
this.widgetService.triggerFallback = (hostedUrl, message) => {
|
|
309
313
|
const url = hostedUrl || this.widgetService.state$.value.hostedUrl;
|
|
314
|
+
this.authService.sdk.logging?.warn(message ? `Triggering fallback due to: ${message}` : 'Triggering fallback');
|
|
310
315
|
if (!url) {
|
|
311
|
-
|
|
316
|
+
const error = new Error('No hosted URL provided');
|
|
317
|
+
this.authService.sdk.logging?.error('Fallback error', error);
|
|
318
|
+
throw error;
|
|
312
319
|
}
|
|
313
320
|
this.onFallback.emit(new FallbackError(new URL(url)));
|
|
314
321
|
};
|
|
@@ -330,7 +337,7 @@ class StyLoginRenderer {
|
|
|
330
337
|
screen: data?.screen ?? this.widgetService.state$.value.screen,
|
|
331
338
|
forms: data?.forms ?? this.widgetService.state$.value.forms,
|
|
332
339
|
layout: data?.layout ?? this.widgetService.state$.value.layout,
|
|
333
|
-
messages: data?.messages ??
|
|
340
|
+
messages: data?.messages ?? {},
|
|
334
341
|
branding: data?.branding ?? this.widgetService.state$.value.branding,
|
|
335
342
|
};
|
|
336
343
|
if (newState.screen !== this.widgetService.state$.value.screen) {
|
|
@@ -343,6 +350,9 @@ class StyLoginRenderer {
|
|
|
343
350
|
this.widgetService.forms$.next(forms);
|
|
344
351
|
this.widgetService.messages$.next(messages);
|
|
345
352
|
}
|
|
353
|
+
else {
|
|
354
|
+
this.authService.sdk.logging?.info(`Updating screen: ${newState.screen}`);
|
|
355
|
+
}
|
|
346
356
|
Object.keys(newState.messages ?? {}).forEach((formId) => {
|
|
347
357
|
if (formId === 'global') {
|
|
348
358
|
this.onGlobalMessage.emit(newState.messages?.global?.text ?? '');
|
|
@@ -389,7 +399,7 @@ class StyLoginRenderer {
|
|
|
389
399
|
screen: data?.screen ?? this.widgetService.state$.value.screen,
|
|
390
400
|
forms: data?.forms ?? this.widgetService.state$.value.forms,
|
|
391
401
|
layout: data?.layout ?? this.widgetService.state$.value.layout,
|
|
392
|
-
messages: data?.messages ??
|
|
402
|
+
messages: data?.messages ?? {},
|
|
393
403
|
branding: data?.branding ?? this.widgetService.state$.value.branding,
|
|
394
404
|
};
|
|
395
405
|
if (await this.authService.sdk.isAuthenticated) {
|
|
@@ -434,7 +444,7 @@ class StyLoginRenderer {
|
|
|
434
444
|
if (state.screen) {
|
|
435
445
|
const component = this.widgets['layout'];
|
|
436
446
|
if (!component) {
|
|
437
|
-
|
|
447
|
+
this.widgetService.triggerFallback(undefined, 'No layout component provided');
|
|
438
448
|
}
|
|
439
449
|
const widgetRendererRef = this.$containerRef.createComponent(StyWidgetRenderer);
|
|
440
450
|
widgetRendererRef.setInput('items', state.layout?.items);
|
|
@@ -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) => 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 || !component) {\n\t\t\t\t\tthis.widgetService.triggerFallback();\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();\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();\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\tprivate stateSub?: 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) => {\n\t\t\tconst url = hostedUrl || this.widgetService.state$.value.hostedUrl;\n\n\t\t\tif (!url) {\n\t\t\t\tthrow new Error('No hosted URL provided');\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 ?? this.widgetService.state$.value.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}\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}\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 ?? this.widgetService.state$.value.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\treturn this.widgetService.triggerFallback();\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,KA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AAA,CAAA;sBAAtC,MAAM;uBAAC,UAAU;gBACQ,OAAO,EAAA,CAAA;sBAAhC,MAAM;uBAAC,OAAO;gBAEW,OAAO,EAAA,CAAA;sBAAhC,MAAM;uBAAC,OAAO;gBACmB,eAAe,EAAA,CAAA;sBAAhD,MAAM;uBAAC,eAAe;gBACQ,YAAY,EAAA,CAAA;sBAA1C,MAAM;uBAAC,YAAY;gBAEuD,aAAa,EAAA,CAAA;sBAAvF,SAAS;uBAAC,WAAW,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE;;;MC5BpD,oBAAoB,CAAA;IAChC,OAAO,OAAO,CAAC,OAAmB,EAAA;QACjC,OAAO;AACN,YAAA,QAAQ,EAAE,oBAAoB;AAC9B,YAAA,SAAS,EAAE,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;SACvC;IACF;wGANY,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,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;;;;"}
|
|
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}\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"],"mappings":";;;;;;;;;;;;;AAWA;;AAEG;MAIU,uBAAuB,CAAA;AAC1B,IAAA,QAAQ,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC;AAC9C,IAAA,MAAM,GAAG,IAAI,eAAe,CAA0C,EAAE,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W,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE;;;MC3BpD,oBAAoB,CAAA;IAChC,OAAO,OAAO,CAAC,OAAmB,EAAA;QACjC,OAAO;AACN,YAAA,QAAQ,EAAE,oBAAoB;AAC9B,YAAA,SAAS,EAAE,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;SACvC;IACF;wGANY,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,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;;;;"}
|
|
@@ -10,7 +10,6 @@ export declare class StyLoginRenderer implements OnInit, OnDestroy {
|
|
|
10
10
|
protected authService: StrivacityAuthService<NativeFlow>;
|
|
11
11
|
protected widgetService: StrivacityWidgetService;
|
|
12
12
|
private subscriptions;
|
|
13
|
-
private stateSub?;
|
|
14
13
|
private createdComponentRefs;
|
|
15
14
|
loginHandler: ReturnType<StrivacityAuthService<NativeFlow>['sdk']['login']>;
|
|
16
15
|
widgets: Record<WidgetType, Type<any>>;
|
|
@@ -15,7 +15,7 @@ export declare class StrivacityWidgetService {
|
|
|
15
15
|
readonly forms$: BehaviorSubject<Record<string, Record<string, unknown>>>;
|
|
16
16
|
readonly messages$: BehaviorSubject<Record<string, Record<string, LoginFlowMessage>>>;
|
|
17
17
|
readonly state$: BehaviorSubject<LoginFlowState>;
|
|
18
|
-
triggerFallback: (hostedUrl?: string) => void;
|
|
18
|
+
triggerFallback: (hostedUrl?: string, message?: string) => void;
|
|
19
19
|
triggerClose: () => void;
|
|
20
20
|
submitForm: (formId: string) => Promise<void>;
|
|
21
21
|
setFormValue(formId: string, widgetId: string, value: unknown): void;
|
package/dist/public-api.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type { NativeFlow } from '@strivacity/sdk-core/flows/NativeFlow';
|
|
|
5
5
|
export * from '@strivacity/sdk-core';
|
|
6
6
|
export type * from './lib/utils/types';
|
|
7
7
|
export { HttpClient } from '@strivacity/sdk-core/utils/HttpClient';
|
|
8
|
+
export { DefaultLogging } from '@strivacity/sdk-core/utils/Logging';
|
|
8
9
|
export { LocalStorage } from '@strivacity/sdk-core/storages/LocalStorage';
|
|
9
10
|
export { SessionStorage } from '@strivacity/sdk-core/storages/SessionStorage';
|
|
10
11
|
export { createCredential, getCredential } from '@strivacity/sdk-core/utils/credentials';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strivacity/sdk-angular",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
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": "2.
|
|
13
|
+
"@strivacity/sdk-core": "2.3.0"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@angular/core": ">=14"
|