@descope/angular-sdk 0.0.0-next-5d0760a4-20240722 → 0.0.0-next-0e292820-20250415

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.
Files changed (60) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +711 -11
  3. package/{esm2022 → dist/esm2022}/environment.mjs +2 -2
  4. package/dist/esm2022/lib/components/access-key-management/access-key-management.component.mjs +67 -0
  5. package/dist/esm2022/lib/components/applications-portal/applications-portal.component.mjs +75 -0
  6. package/dist/esm2022/lib/components/audit-management/audit-management.component.mjs +70 -0
  7. package/dist/esm2022/lib/components/descope/descope.component.mjs +191 -0
  8. package/dist/esm2022/lib/components/role-management/role-management.component.mjs +70 -0
  9. package/dist/esm2022/lib/components/sign-in-flow/sign-in-flow.component.mjs +56 -0
  10. package/dist/esm2022/lib/components/sign-up-flow/sign-up-flow.component.mjs +56 -0
  11. package/dist/esm2022/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.mjs +56 -0
  12. package/dist/esm2022/lib/components/user-management/user-management.component.mjs +70 -0
  13. package/dist/esm2022/lib/components/user-profile/user-profile.component.mjs +78 -0
  14. package/dist/esm2022/lib/descope-auth.module.mjs +83 -0
  15. package/{esm2022 → dist/esm2022}/lib/services/descope-auth.guard.mjs +1 -1
  16. package/dist/esm2022/lib/services/descope-auth.service.mjs +145 -0
  17. package/dist/esm2022/lib/services/descope.interceptor.mjs +51 -0
  18. package/dist/esm2022/lib/types/types.mjs +6 -0
  19. package/{esm2022 → dist/esm2022}/lib/utils/constants.mjs +1 -1
  20. package/dist/esm2022/lib/utils/helpers.mjs +27 -0
  21. package/{esm2022 → dist/esm2022}/public-api.mjs +2 -1
  22. package/{fesm2022 → dist/fesm2022}/descope-angular-sdk.mjs +263 -80
  23. package/dist/fesm2022/descope-angular-sdk.mjs.map +1 -0
  24. package/{lib → dist/lib}/components/access-key-management/access-key-management.component.d.ts +3 -1
  25. package/dist/lib/components/applications-portal/applications-portal.component.d.ts +24 -0
  26. package/{lib → dist/lib}/components/audit-management/audit-management.component.d.ts +3 -1
  27. package/{lib → dist/lib}/components/descope/descope.component.d.ts +8 -1
  28. package/{lib → dist/lib}/components/role-management/role-management.component.d.ts +3 -1
  29. package/{lib → dist/lib}/components/sign-in-flow/sign-in-flow.component.d.ts +7 -1
  30. package/{lib → dist/lib}/components/sign-up-flow/sign-up-flow.component.d.ts +7 -1
  31. package/{lib → dist/lib}/components/sign-up-or-in-flow/sign-up-or-in-flow.component.d.ts +7 -1
  32. package/{lib → dist/lib}/components/user-management/user-management.component.d.ts +3 -1
  33. package/{lib → dist/lib}/components/user-profile/user-profile.component.d.ts +6 -2
  34. package/{lib → dist/lib}/descope-auth.module.d.ts +2 -1
  35. package/{lib → dist/lib}/services/descope-auth.service.d.ts +7 -6
  36. package/{lib → dist/lib}/types/types.d.ts +3 -1
  37. package/{public-api.d.ts → dist/public-api.d.ts} +1 -0
  38. package/package.json +74 -25
  39. package/esm2022/lib/components/access-key-management/access-key-management.component.mjs +0 -61
  40. package/esm2022/lib/components/audit-management/audit-management.component.mjs +0 -61
  41. package/esm2022/lib/components/descope/descope.component.mjs +0 -156
  42. package/esm2022/lib/components/role-management/role-management.component.mjs +0 -61
  43. package/esm2022/lib/components/sign-in-flow/sign-in-flow.component.mjs +0 -44
  44. package/esm2022/lib/components/sign-up-flow/sign-up-flow.component.mjs +0 -44
  45. package/esm2022/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.mjs +0 -44
  46. package/esm2022/lib/components/user-management/user-management.component.mjs +0 -61
  47. package/esm2022/lib/components/user-profile/user-profile.component.mjs +0 -66
  48. package/esm2022/lib/descope-auth.module.mjs +0 -77
  49. package/esm2022/lib/services/descope-auth.service.mjs +0 -154
  50. package/esm2022/lib/services/descope.interceptor.mjs +0 -51
  51. package/esm2022/lib/types/types.mjs +0 -6
  52. package/esm2022/lib/utils/helpers.mjs +0 -27
  53. package/fesm2022/descope-angular-sdk.mjs.map +0 -1
  54. /package/{environment.d.ts → dist/environment.d.ts} +0 -0
  55. /package/{esm2022 → dist/esm2022}/descope-angular-sdk.mjs +0 -0
  56. /package/{index.d.ts → dist/index.d.ts} +0 -0
  57. /package/{lib → dist/lib}/services/descope-auth.guard.d.ts +0 -0
  58. /package/{lib → dist/lib}/services/descope.interceptor.d.ts +0 -0
  59. /package/{lib → dist/lib}/utils/constants.d.ts +0 -0
  60. /package/{lib → dist/lib}/utils/helpers.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, inject, EventEmitter, Component, Input, Output, NgModule, CUSTOM_ELEMENTS_SCHEMA, Optional, SkipSelf } from '@angular/core';
3
3
  import createSdk from '@descope/web-js-sdk';
4
- import { from, BehaviorSubject, tap, finalize, of, throwError } from 'rxjs';
4
+ import { from, BehaviorSubject, finalize, tap, of, throwError } from 'rxjs';
5
5
  import { Router } from '@angular/router';
6
6
  import { switchMap, catchError } from 'rxjs/operators';
7
7
  import DescopeWebComponent from '@descope/web-component';
@@ -10,6 +10,7 @@ import DescopeRoleManagementWidget from '@descope/role-management-widget';
10
10
  import DescopeAccessKeyManagementWidget from '@descope/access-key-management-widget';
11
11
  import DescopeAuditManagementWidget from '@descope/audit-management-widget';
12
12
  import DescopeUserProfileWidget from '@descope/user-profile-widget';
13
+ import DescopeApplicationsPortalWidget from '@descope/applications-portal-widget';
13
14
 
14
15
  function observabilify(value) {
15
16
  /* eslint-disable @typescript-eslint/no-explicit-any */
@@ -38,7 +39,7 @@ function observabilify(value) {
38
39
  }
39
40
 
40
41
  const environment = {
41
- buildVersion: '0.0.0-next-5d0760a4-20240722'
42
+ buildVersion: '0.14.11'
42
43
  };
43
44
 
44
45
  const baseHeaders = {
@@ -73,6 +74,7 @@ class DescopeAuthService {
73
74
  });
74
75
  this.user$ = this.userSubject.asObservable();
75
76
  this.descopeSdk.onSessionTokenChange(this.setSession.bind(this));
77
+ this.descopeSdk.onIsAuthenticatedChange(this.setIsAuthenticated.bind(this));
76
78
  this.descopeSdk.onUserChange(this.setUser.bind(this));
77
79
  }
78
80
  refreshSession() {
@@ -81,23 +83,7 @@ class DescopeAuthService {
81
83
  ...beforeRefreshSession,
82
84
  isSessionLoading: true
83
85
  });
84
- return this.descopeSdk.refresh().pipe(tap((data) => {
85
- const afterRequestSession = this.sessionSubject.value;
86
- if (data.ok && data.data) {
87
- this.sessionSubject.next({
88
- ...afterRequestSession,
89
- sessionToken: data.data.sessionJwt,
90
- isAuthenticated: !!data.data.sessionJwt
91
- });
92
- }
93
- else {
94
- this.sessionSubject.next({
95
- ...afterRequestSession,
96
- sessionToken: '',
97
- isAuthenticated: false
98
- });
99
- }
100
- }), finalize(() => {
86
+ return this.descopeSdk.refresh().pipe(finalize(() => {
101
87
  const afterRefreshSession = this.sessionSubject.value;
102
88
  this.sessionSubject.next({
103
89
  ...afterRefreshSession,
@@ -178,9 +164,15 @@ class DescopeAuthService {
178
164
  setSession(sessionToken) {
179
165
  const currentSession = this.sessionSubject.value;
180
166
  this.sessionSubject.next({
181
- sessionToken,
182
- isAuthenticated: !!sessionToken,
183
- isSessionLoading: currentSession.isSessionLoading
167
+ ...currentSession,
168
+ sessionToken
169
+ });
170
+ }
171
+ setIsAuthenticated(isAuthenticated) {
172
+ const currentSession = this.sessionSubject.value;
173
+ this.sessionSubject.next({
174
+ ...currentSession,
175
+ isAuthenticated
184
176
  });
185
177
  }
186
178
  setUser(user) {
@@ -190,15 +182,15 @@ class DescopeAuthService {
190
182
  user
191
183
  });
192
184
  }
193
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: DescopeAuthService, deps: [{ token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
194
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: DescopeAuthService, providedIn: 'root' }); }
185
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: DescopeAuthService, deps: [{ token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
186
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: DescopeAuthService, providedIn: 'root' }); }
195
187
  }
196
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: DescopeAuthService, decorators: [{
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: DescopeAuthService, decorators: [{
197
189
  type: Injectable,
198
190
  args: [{
199
191
  providedIn: 'root'
200
192
  }]
201
- }], ctorParameters: function () { return [{ type: DescopeAuthConfig }]; } });
193
+ }], ctorParameters: () => [{ type: DescopeAuthConfig }] });
202
194
 
203
195
  const descopeAuthGuard = (route) => {
204
196
  const authService = inject(DescopeAuthService);
@@ -268,11 +260,13 @@ class DescopeComponent {
268
260
  this.projectId = descopeConfig.projectId;
269
261
  this.baseUrl = descopeConfig.baseUrl;
270
262
  this.baseStaticUrl = descopeConfig.baseStaticUrl;
263
+ this.baseCdnUrl = descopeConfig.baseCdnUrl;
271
264
  this.storeLastAuthenticatedUser = descopeConfig.storeLastAuthenticatedUser;
272
265
  }
273
266
  ngOnInit() {
274
267
  const sdk = this.authService.descopeSdk; // Capture the class context in a variable
275
- DescopeWebComponent.sdkConfigOverrides = {
268
+ const WebComponent = customElements?.get('descope-wc') || DescopeWebComponent;
269
+ WebComponent.sdkConfigOverrides = {
276
270
  // Overrides the web-component's base headers to indicate usage via the React SDK
277
271
  baseHeaders,
278
272
  // Disables token persistence within the web-component to delegate token management
@@ -307,6 +301,9 @@ class DescopeComponent {
307
301
  if (this.baseStaticUrl) {
308
302
  this.webComponent.setAttribute('base-static-url', this.baseStaticUrl);
309
303
  }
304
+ if (this.baseCdnUrl) {
305
+ this.webComponent.setAttribute('base-cdn-url', this.baseCdnUrl);
306
+ }
310
307
  if (this.storeLastAuthenticatedUser) {
311
308
  this.webComponent.setAttribute('store-last-authenticated-user', this.storeLastAuthenticatedUser.toString());
312
309
  }
@@ -328,15 +325,33 @@ class DescopeComponent {
328
325
  if (this.autoFocus) {
329
326
  this.webComponent.setAttribute('auto-focus', this.autoFocus.toString());
330
327
  }
328
+ if (this.validateOnBlur) {
329
+ this.webComponent.setAttribute('validate-on-blur', this.validateOnBlur.toString());
330
+ }
331
+ if (this.restartOnError) {
332
+ this.webComponent.setAttribute('restart-on-error', this.restartOnError.toString());
333
+ }
331
334
  if (this.debug) {
332
335
  this.webComponent.setAttribute('debug', this.debug.toString());
333
336
  }
337
+ if (this.styleId) {
338
+ this.webComponent.setAttribute('style-id', this.styleId);
339
+ }
334
340
  if (this.errorTransformer) {
335
341
  this.webComponent.errorTransformer = this.errorTransformer;
336
342
  }
343
+ if (this.onScreenUpdate) {
344
+ this.webComponent.onScreenUpdate = this.onScreenUpdate;
345
+ }
337
346
  if (this.client) {
338
347
  this.webComponent.setAttribute('client', JSON.stringify(this.client));
339
348
  }
349
+ if (this.nonce) {
350
+ this.webComponent.setAttribute('nonce', JSON.stringify(this.nonce));
351
+ }
352
+ if (this.dismissScreenErrorOnInput) {
353
+ this.webComponent.setAttribute('dismiss-screen-error-on-input', JSON.stringify(this.dismissScreenErrorOnInput));
354
+ }
340
355
  if (this.form) {
341
356
  this.webComponent.setAttribute('form', JSON.stringify(this.form));
342
357
  }
@@ -363,17 +378,17 @@ class DescopeComponent {
363
378
  });
364
379
  }
365
380
  }
366
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: DescopeComponent, deps: [{ token: i0.ElementRef }, { token: DescopeAuthService }, { token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
367
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: DescopeComponent, isStandalone: true, selector: "descope[flowId]", inputs: { flowId: "flowId", locale: "locale", theme: "theme", tenant: "tenant", telemetryKey: "telemetryKey", redirectUrl: "redirectUrl", autoFocus: "autoFocus", debug: "debug", errorTransformer: "errorTransformer", client: "client", form: "form", logger: "logger" }, outputs: { success: "success", error: "error", ready: "ready" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true }); }
381
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: DescopeComponent, deps: [{ token: i0.ElementRef }, { token: DescopeAuthService }, { token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
382
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: DescopeComponent, isStandalone: true, selector: "descope[flowId]", inputs: { flowId: "flowId", locale: "locale", theme: "theme", tenant: "tenant", telemetryKey: "telemetryKey", redirectUrl: "redirectUrl", autoFocus: "autoFocus", validateOnBlur: "validateOnBlur", restartOnError: "restartOnError", debug: "debug", errorTransformer: "errorTransformer", onScreenUpdate: "onScreenUpdate", client: "client", nonce: "nonce", dismissScreenErrorOnInput: "dismissScreenErrorOnInput", form: "form", logger: "logger", styleId: "styleId" }, outputs: { success: "success", error: "error", ready: "ready" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true }); }
368
383
  }
369
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: DescopeComponent, decorators: [{
384
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: DescopeComponent, decorators: [{
370
385
  type: Component,
371
386
  args: [{
372
387
  selector: 'descope[flowId]',
373
388
  standalone: true,
374
389
  template: ''
375
390
  }]
376
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: DescopeAuthService }, { type: DescopeAuthConfig }]; }, propDecorators: { flowId: [{
391
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: DescopeAuthService }, { type: DescopeAuthConfig }], propDecorators: { flowId: [{
377
392
  type: Input
378
393
  }], locale: [{
379
394
  type: Input
@@ -387,16 +402,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
387
402
  type: Input
388
403
  }], autoFocus: [{
389
404
  type: Input
405
+ }], validateOnBlur: [{
406
+ type: Input
407
+ }], restartOnError: [{
408
+ type: Input
390
409
  }], debug: [{
391
410
  type: Input
392
411
  }], errorTransformer: [{
393
412
  type: Input
413
+ }], onScreenUpdate: [{
414
+ type: Input
394
415
  }], client: [{
395
416
  type: Input
417
+ }], nonce: [{
418
+ type: Input
419
+ }], dismissScreenErrorOnInput: [{
420
+ type: Input
396
421
  }], form: [{
397
422
  type: Input
398
423
  }], logger: [{
399
424
  type: Input
425
+ }], styleId: [{
426
+ type: Input
400
427
  }], success: [{
401
428
  type: Output
402
429
  }], error: [{
@@ -411,13 +438,13 @@ class SignInFlowComponent {
411
438
  this.error = new EventEmitter();
412
439
  this.projectId = descopeConfig.projectId;
413
440
  }
414
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SignInFlowComponent, deps: [{ token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
415
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: SignInFlowComponent, isStandalone: true, selector: "descope-sign-in-flow", inputs: { locale: "locale", theme: "theme", tenant: "tenant", telemetryKey: "telemetryKey", redirectUrl: "redirectUrl", autoFocus: "autoFocus", debug: "debug", errorTransformer: "errorTransformer", client: "client", form: "form", logger: "logger" }, outputs: { success: "success", error: "error" }, ngImport: i0, template: "<descope\n\t(success)=\"success.emit($event)\"\n\t(error)=\"error.emit($event)\"\n\tflowId=\"sign-in\"\n\t[locale]=\"locale\"\n\t[theme]=\"theme\"\n\t[tenant]=\"tenant\"\n\t[telemetryKey]=\"telemetryKey\"\n\t[redirectUrl]=\"redirectUrl\"\n\t[autoFocus]=\"autoFocus\"\n\t[debug]=\"debug\"\n\t[errorTransformer]=\"errorTransformer\"\n\t[client]=\"client\"\n\t[form]=\"form\"\n\t[logger]=\"logger\"\n>\n</descope>\n", dependencies: [{ kind: "component", type: DescopeComponent, selector: "descope[flowId]", inputs: ["flowId", "locale", "theme", "tenant", "telemetryKey", "redirectUrl", "autoFocus", "debug", "errorTransformer", "client", "form", "logger"], outputs: ["success", "error", "ready"] }] }); }
441
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SignInFlowComponent, deps: [{ token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
442
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: SignInFlowComponent, isStandalone: true, selector: "descope-sign-in-flow", inputs: { locale: "locale", theme: "theme", tenant: "tenant", telemetryKey: "telemetryKey", redirectUrl: "redirectUrl", autoFocus: "autoFocus", validateOnBlur: "validateOnBlur", restartOnError: "restartOnError", debug: "debug", errorTransformer: "errorTransformer", onScreenUpdate: "onScreenUpdate", client: "client", nonce: "nonce", dismissScreenErrorOnInput: "dismissScreenErrorOnInput", form: "form", logger: "logger", styleId: "styleId" }, outputs: { success: "success", error: "error" }, ngImport: i0, template: "<descope\n (success)=\"success.emit($event)\"\n (error)=\"error.emit($event)\"\n flowId=\"sign-in\"\n [locale]=\"locale\"\n [theme]=\"theme\"\n [tenant]=\"tenant\"\n [telemetryKey]=\"telemetryKey\"\n [redirectUrl]=\"redirectUrl\"\n [autoFocus]=\"autoFocus\"\n [validateOnBlur]=\"validateOnBlur\"\n [restartOnError]=\"restartOnError\"\n [debug]=\"debug\"\n [errorTransformer]=\"errorTransformer\"\n [onScreenUpdate]=\"onScreenUpdate\"\n [client]=\"client\"\n [nonce]=\"nonce\"\n [dismissScreenErrorOnInput]=\"dismissScreenErrorOnInput\"\n [form]=\"form\"\n [logger]=\"logger\"\n [styleId]=\"styleId\"\n>\n</descope>\n", dependencies: [{ kind: "component", type: DescopeComponent, selector: "descope[flowId]", inputs: ["flowId", "locale", "theme", "tenant", "telemetryKey", "redirectUrl", "autoFocus", "validateOnBlur", "restartOnError", "debug", "errorTransformer", "onScreenUpdate", "client", "nonce", "dismissScreenErrorOnInput", "form", "logger", "styleId"], outputs: ["success", "error", "ready"] }] }); }
416
443
  }
417
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SignInFlowComponent, decorators: [{
444
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SignInFlowComponent, decorators: [{
418
445
  type: Component,
419
- args: [{ selector: 'descope-sign-in-flow', standalone: true, imports: [DescopeComponent], template: "<descope\n\t(success)=\"success.emit($event)\"\n\t(error)=\"error.emit($event)\"\n\tflowId=\"sign-in\"\n\t[locale]=\"locale\"\n\t[theme]=\"theme\"\n\t[tenant]=\"tenant\"\n\t[telemetryKey]=\"telemetryKey\"\n\t[redirectUrl]=\"redirectUrl\"\n\t[autoFocus]=\"autoFocus\"\n\t[debug]=\"debug\"\n\t[errorTransformer]=\"errorTransformer\"\n\t[client]=\"client\"\n\t[form]=\"form\"\n\t[logger]=\"logger\"\n>\n</descope>\n" }]
420
- }], ctorParameters: function () { return [{ type: DescopeAuthConfig }]; }, propDecorators: { locale: [{
446
+ args: [{ selector: 'descope-sign-in-flow', standalone: true, imports: [DescopeComponent], template: "<descope\n (success)=\"success.emit($event)\"\n (error)=\"error.emit($event)\"\n flowId=\"sign-in\"\n [locale]=\"locale\"\n [theme]=\"theme\"\n [tenant]=\"tenant\"\n [telemetryKey]=\"telemetryKey\"\n [redirectUrl]=\"redirectUrl\"\n [autoFocus]=\"autoFocus\"\n [validateOnBlur]=\"validateOnBlur\"\n [restartOnError]=\"restartOnError\"\n [debug]=\"debug\"\n [errorTransformer]=\"errorTransformer\"\n [onScreenUpdate]=\"onScreenUpdate\"\n [client]=\"client\"\n [nonce]=\"nonce\"\n [dismissScreenErrorOnInput]=\"dismissScreenErrorOnInput\"\n [form]=\"form\"\n [logger]=\"logger\"\n [styleId]=\"styleId\"\n>\n</descope>\n" }]
447
+ }], ctorParameters: () => [{ type: DescopeAuthConfig }], propDecorators: { locale: [{
421
448
  type: Input
422
449
  }], theme: [{
423
450
  type: Input
@@ -429,16 +456,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
429
456
  type: Input
430
457
  }], autoFocus: [{
431
458
  type: Input
459
+ }], validateOnBlur: [{
460
+ type: Input
461
+ }], restartOnError: [{
462
+ type: Input
432
463
  }], debug: [{
433
464
  type: Input
434
465
  }], errorTransformer: [{
435
466
  type: Input
467
+ }], onScreenUpdate: [{
468
+ type: Input
436
469
  }], client: [{
437
470
  type: Input
471
+ }], nonce: [{
472
+ type: Input
473
+ }], dismissScreenErrorOnInput: [{
474
+ type: Input
438
475
  }], form: [{
439
476
  type: Input
440
477
  }], logger: [{
441
478
  type: Input
479
+ }], styleId: [{
480
+ type: Input
442
481
  }], success: [{
443
482
  type: Output
444
483
  }], error: [{
@@ -451,13 +490,13 @@ class SignUpFlowComponent {
451
490
  this.error = new EventEmitter();
452
491
  this.projectId = descopeConfig.projectId;
453
492
  }
454
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SignUpFlowComponent, deps: [{ token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
455
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: SignUpFlowComponent, isStandalone: true, selector: "descope-sign-up-flow", inputs: { locale: "locale", theme: "theme", tenant: "tenant", telemetryKey: "telemetryKey", redirectUrl: "redirectUrl", autoFocus: "autoFocus", debug: "debug", errorTransformer: "errorTransformer", client: "client", form: "form", logger: "logger" }, outputs: { success: "success", error: "error" }, ngImport: i0, template: "<descope\n\t(success)=\"success.emit($event)\"\n\t(error)=\"error.emit($event)\"\n\tflowId=\"sign-up\"\n\t[locale]=\"locale\"\n\t[theme]=\"theme\"\n\t[tenant]=\"tenant\"\n\t[telemetryKey]=\"telemetryKey\"\n\t[redirectUrl]=\"redirectUrl\"\n\t[autoFocus]=\"autoFocus\"\n\t[debug]=\"debug\"\n\t[errorTransformer]=\"errorTransformer\"\n\t[client]=\"client\"\n\t[form]=\"form\"\n\t[logger]=\"logger\"\n>\n</descope>\n", dependencies: [{ kind: "component", type: DescopeComponent, selector: "descope[flowId]", inputs: ["flowId", "locale", "theme", "tenant", "telemetryKey", "redirectUrl", "autoFocus", "debug", "errorTransformer", "client", "form", "logger"], outputs: ["success", "error", "ready"] }] }); }
493
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SignUpFlowComponent, deps: [{ token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
494
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: SignUpFlowComponent, isStandalone: true, selector: "descope-sign-up-flow", inputs: { locale: "locale", theme: "theme", tenant: "tenant", telemetryKey: "telemetryKey", redirectUrl: "redirectUrl", autoFocus: "autoFocus", validateOnBlur: "validateOnBlur", restartOnError: "restartOnError", debug: "debug", errorTransformer: "errorTransformer", onScreenUpdate: "onScreenUpdate", client: "client", nonce: "nonce", dismissScreenErrorOnInput: "dismissScreenErrorOnInput", form: "form", logger: "logger", styleId: "styleId" }, outputs: { success: "success", error: "error" }, ngImport: i0, template: "<descope\n (success)=\"success.emit($event)\"\n (error)=\"error.emit($event)\"\n flowId=\"sign-up\"\n [locale]=\"locale\"\n [theme]=\"theme\"\n [tenant]=\"tenant\"\n [telemetryKey]=\"telemetryKey\"\n [redirectUrl]=\"redirectUrl\"\n [autoFocus]=\"autoFocus\"\n [validateOnBlur]=\"validateOnBlur\"\n [restartOnError]=\"restartOnError\"\n [debug]=\"debug\"\n [errorTransformer]=\"errorTransformer\"\n [onScreenUpdate]=\"onScreenUpdate\"\n [client]=\"client\"\n [nonce]=\"nonce\"\n [dismissScreenErrorOnInput]=\"dismissScreenErrorOnInput\"\n [form]=\"form\"\n [logger]=\"logger\"\n [styleId]=\"styleId\"\n>\n</descope>\n", dependencies: [{ kind: "component", type: DescopeComponent, selector: "descope[flowId]", inputs: ["flowId", "locale", "theme", "tenant", "telemetryKey", "redirectUrl", "autoFocus", "validateOnBlur", "restartOnError", "debug", "errorTransformer", "onScreenUpdate", "client", "nonce", "dismissScreenErrorOnInput", "form", "logger", "styleId"], outputs: ["success", "error", "ready"] }] }); }
456
495
  }
457
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SignUpFlowComponent, decorators: [{
496
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SignUpFlowComponent, decorators: [{
458
497
  type: Component,
459
- args: [{ selector: 'descope-sign-up-flow', standalone: true, imports: [DescopeComponent], template: "<descope\n\t(success)=\"success.emit($event)\"\n\t(error)=\"error.emit($event)\"\n\tflowId=\"sign-up\"\n\t[locale]=\"locale\"\n\t[theme]=\"theme\"\n\t[tenant]=\"tenant\"\n\t[telemetryKey]=\"telemetryKey\"\n\t[redirectUrl]=\"redirectUrl\"\n\t[autoFocus]=\"autoFocus\"\n\t[debug]=\"debug\"\n\t[errorTransformer]=\"errorTransformer\"\n\t[client]=\"client\"\n\t[form]=\"form\"\n\t[logger]=\"logger\"\n>\n</descope>\n" }]
460
- }], ctorParameters: function () { return [{ type: DescopeAuthConfig }]; }, propDecorators: { locale: [{
498
+ args: [{ selector: 'descope-sign-up-flow', standalone: true, imports: [DescopeComponent], template: "<descope\n (success)=\"success.emit($event)\"\n (error)=\"error.emit($event)\"\n flowId=\"sign-up\"\n [locale]=\"locale\"\n [theme]=\"theme\"\n [tenant]=\"tenant\"\n [telemetryKey]=\"telemetryKey\"\n [redirectUrl]=\"redirectUrl\"\n [autoFocus]=\"autoFocus\"\n [validateOnBlur]=\"validateOnBlur\"\n [restartOnError]=\"restartOnError\"\n [debug]=\"debug\"\n [errorTransformer]=\"errorTransformer\"\n [onScreenUpdate]=\"onScreenUpdate\"\n [client]=\"client\"\n [nonce]=\"nonce\"\n [dismissScreenErrorOnInput]=\"dismissScreenErrorOnInput\"\n [form]=\"form\"\n [logger]=\"logger\"\n [styleId]=\"styleId\"\n>\n</descope>\n" }]
499
+ }], ctorParameters: () => [{ type: DescopeAuthConfig }], propDecorators: { locale: [{
461
500
  type: Input
462
501
  }], theme: [{
463
502
  type: Input
@@ -469,16 +508,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
469
508
  type: Input
470
509
  }], autoFocus: [{
471
510
  type: Input
511
+ }], validateOnBlur: [{
512
+ type: Input
513
+ }], restartOnError: [{
514
+ type: Input
472
515
  }], debug: [{
473
516
  type: Input
474
517
  }], errorTransformer: [{
475
518
  type: Input
519
+ }], onScreenUpdate: [{
520
+ type: Input
476
521
  }], client: [{
477
522
  type: Input
523
+ }], nonce: [{
524
+ type: Input
525
+ }], dismissScreenErrorOnInput: [{
526
+ type: Input
478
527
  }], form: [{
479
528
  type: Input
480
529
  }], logger: [{
481
530
  type: Input
531
+ }], styleId: [{
532
+ type: Input
482
533
  }], success: [{
483
534
  type: Output
484
535
  }], error: [{
@@ -491,13 +542,13 @@ class SignUpOrInFlowComponent {
491
542
  this.error = new EventEmitter();
492
543
  this.projectId = descopeConfig.projectId;
493
544
  }
494
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SignUpOrInFlowComponent, deps: [{ token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
495
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: SignUpOrInFlowComponent, isStandalone: true, selector: "descope-sign-up-or-in-flow", inputs: { locale: "locale", theme: "theme", tenant: "tenant", telemetryKey: "telemetryKey", redirectUrl: "redirectUrl", autoFocus: "autoFocus", debug: "debug", errorTransformer: "errorTransformer", client: "client", form: "form", logger: "logger" }, outputs: { success: "success", error: "error" }, ngImport: i0, template: "<descope\n\t(success)=\"success.emit($event)\"\n\t(error)=\"error.emit($event)\"\n\tflowId=\"sign-up-or-in\"\n\t[locale]=\"locale\"\n\t[theme]=\"theme\"\n\t[tenant]=\"tenant\"\n\t[telemetryKey]=\"telemetryKey\"\n\t[redirectUrl]=\"redirectUrl\"\n\t[autoFocus]=\"autoFocus\"\n\t[debug]=\"debug\"\n\t[errorTransformer]=\"errorTransformer\"\n\t[client]=\"client\"\n\t[form]=\"form\"\n\t[logger]=\"logger\"\n>\n</descope>\n", dependencies: [{ kind: "component", type: DescopeComponent, selector: "descope[flowId]", inputs: ["flowId", "locale", "theme", "tenant", "telemetryKey", "redirectUrl", "autoFocus", "debug", "errorTransformer", "client", "form", "logger"], outputs: ["success", "error", "ready"] }] }); }
545
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SignUpOrInFlowComponent, deps: [{ token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
546
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: SignUpOrInFlowComponent, isStandalone: true, selector: "descope-sign-up-or-in-flow", inputs: { locale: "locale", theme: "theme", tenant: "tenant", telemetryKey: "telemetryKey", redirectUrl: "redirectUrl", autoFocus: "autoFocus", validateOnBlur: "validateOnBlur", restartOnError: "restartOnError", debug: "debug", errorTransformer: "errorTransformer", onScreenUpdate: "onScreenUpdate", client: "client", nonce: "nonce", dismissScreenErrorOnInput: "dismissScreenErrorOnInput", form: "form", logger: "logger", styleId: "styleId" }, outputs: { success: "success", error: "error" }, ngImport: i0, template: "<descope\n (success)=\"success.emit($event)\"\n (error)=\"error.emit($event)\"\n flowId=\"sign-up-or-in\"\n [locale]=\"locale\"\n [theme]=\"theme\"\n [tenant]=\"tenant\"\n [telemetryKey]=\"telemetryKey\"\n [redirectUrl]=\"redirectUrl\"\n [autoFocus]=\"autoFocus\"\n [validateOnBlur]=\"validateOnBlur\"\n [restartOnError]=\"restartOnError\"\n [debug]=\"debug\"\n [errorTransformer]=\"errorTransformer\"\n [onScreenUpdate]=\"onScreenUpdate\"\n [client]=\"client\"\n [nonce]=\"nonce\"\n [dismissScreenErrorOnInput]=\"dismissScreenErrorOnInput\"\n [form]=\"form\"\n [logger]=\"logger\"\n [styleId]=\"styleId\"\n>\n</descope>\n", dependencies: [{ kind: "component", type: DescopeComponent, selector: "descope[flowId]", inputs: ["flowId", "locale", "theme", "tenant", "telemetryKey", "redirectUrl", "autoFocus", "validateOnBlur", "restartOnError", "debug", "errorTransformer", "onScreenUpdate", "client", "nonce", "dismissScreenErrorOnInput", "form", "logger", "styleId"], outputs: ["success", "error", "ready"] }] }); }
496
547
  }
497
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SignUpOrInFlowComponent, decorators: [{
548
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SignUpOrInFlowComponent, decorators: [{
498
549
  type: Component,
499
- args: [{ selector: 'descope-sign-up-or-in-flow', standalone: true, imports: [DescopeComponent], template: "<descope\n\t(success)=\"success.emit($event)\"\n\t(error)=\"error.emit($event)\"\n\tflowId=\"sign-up-or-in\"\n\t[locale]=\"locale\"\n\t[theme]=\"theme\"\n\t[tenant]=\"tenant\"\n\t[telemetryKey]=\"telemetryKey\"\n\t[redirectUrl]=\"redirectUrl\"\n\t[autoFocus]=\"autoFocus\"\n\t[debug]=\"debug\"\n\t[errorTransformer]=\"errorTransformer\"\n\t[client]=\"client\"\n\t[form]=\"form\"\n\t[logger]=\"logger\"\n>\n</descope>\n" }]
500
- }], ctorParameters: function () { return [{ type: DescopeAuthConfig }]; }, propDecorators: { locale: [{
550
+ args: [{ selector: 'descope-sign-up-or-in-flow', standalone: true, imports: [DescopeComponent], template: "<descope\n (success)=\"success.emit($event)\"\n (error)=\"error.emit($event)\"\n flowId=\"sign-up-or-in\"\n [locale]=\"locale\"\n [theme]=\"theme\"\n [tenant]=\"tenant\"\n [telemetryKey]=\"telemetryKey\"\n [redirectUrl]=\"redirectUrl\"\n [autoFocus]=\"autoFocus\"\n [validateOnBlur]=\"validateOnBlur\"\n [restartOnError]=\"restartOnError\"\n [debug]=\"debug\"\n [errorTransformer]=\"errorTransformer\"\n [onScreenUpdate]=\"onScreenUpdate\"\n [client]=\"client\"\n [nonce]=\"nonce\"\n [dismissScreenErrorOnInput]=\"dismissScreenErrorOnInput\"\n [form]=\"form\"\n [logger]=\"logger\"\n [styleId]=\"styleId\"\n>\n</descope>\n" }]
551
+ }], ctorParameters: () => [{ type: DescopeAuthConfig }], propDecorators: { locale: [{
501
552
  type: Input
502
553
  }], theme: [{
503
554
  type: Input
@@ -509,16 +560,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
509
560
  type: Input
510
561
  }], autoFocus: [{
511
562
  type: Input
563
+ }], validateOnBlur: [{
564
+ type: Input
565
+ }], restartOnError: [{
566
+ type: Input
512
567
  }], debug: [{
513
568
  type: Input
514
569
  }], errorTransformer: [{
515
570
  type: Input
571
+ }], onScreenUpdate: [{
572
+ type: Input
516
573
  }], client: [{
517
574
  type: Input
575
+ }], nonce: [{
576
+ type: Input
577
+ }], dismissScreenErrorOnInput: [{
578
+ type: Input
518
579
  }], form: [{
519
580
  type: Input
520
581
  }], logger: [{
521
582
  type: Input
583
+ }], styleId: [{
584
+ type: Input
522
585
  }], success: [{
523
586
  type: Output
524
587
  }], error: [{
@@ -532,6 +595,7 @@ class UserManagementComponent {
532
595
  this.projectId = descopeConfig.projectId;
533
596
  this.baseUrl = descopeConfig.baseUrl;
534
597
  this.baseStaticUrl = descopeConfig.baseStaticUrl;
598
+ this.baseCdnUrl = descopeConfig.baseCdnUrl;
535
599
  }
536
600
  ngOnInit() {
537
601
  this.setupWebComponent();
@@ -550,27 +614,33 @@ class UserManagementComponent {
550
614
  if (this.baseStaticUrl) {
551
615
  this.webComponent.setAttribute('base-static-url', this.baseStaticUrl);
552
616
  }
617
+ if (this.baseCdnUrl) {
618
+ this.webComponent.setAttribute('base-cdn-url', this.baseCdnUrl);
619
+ }
553
620
  if (this.theme) {
554
621
  this.webComponent.setAttribute('theme', this.theme);
555
622
  }
556
623
  if (this.debug) {
557
624
  this.webComponent.setAttribute('debug', this.debug.toString());
558
625
  }
626
+ if (this.styleId) {
627
+ this.webComponent.setAttribute('style-id', this.styleId);
628
+ }
559
629
  if (this.logger) {
560
630
  this.webComponent.logger = this.logger;
561
631
  }
562
632
  }
563
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: UserManagementComponent, deps: [{ token: i0.ElementRef }, { token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
564
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: UserManagementComponent, isStandalone: true, selector: "user-management[tenant]", inputs: { tenant: "tenant", widgetId: "widgetId", theme: "theme", debug: "debug", logger: "logger" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true }); }
633
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: UserManagementComponent, deps: [{ token: i0.ElementRef }, { token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
634
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: UserManagementComponent, isStandalone: true, selector: "user-management[tenant]", inputs: { tenant: "tenant", widgetId: "widgetId", theme: "theme", debug: "debug", logger: "logger", styleId: "styleId" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true }); }
565
635
  }
566
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: UserManagementComponent, decorators: [{
636
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: UserManagementComponent, decorators: [{
567
637
  type: Component,
568
638
  args: [{
569
639
  selector: 'user-management[tenant]',
570
640
  standalone: true,
571
641
  template: ''
572
642
  }]
573
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: DescopeAuthConfig }]; }, propDecorators: { tenant: [{
643
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: DescopeAuthConfig }], propDecorators: { tenant: [{
574
644
  type: Input
575
645
  }], widgetId: [{
576
646
  type: Input
@@ -580,6 +650,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
580
650
  type: Input
581
651
  }], logger: [{
582
652
  type: Input
653
+ }], styleId: [{
654
+ type: Input
583
655
  }] } });
584
656
 
585
657
  class RoleManagementComponent {
@@ -589,6 +661,7 @@ class RoleManagementComponent {
589
661
  this.projectId = descopeConfig.projectId;
590
662
  this.baseUrl = descopeConfig.baseUrl;
591
663
  this.baseStaticUrl = descopeConfig.baseStaticUrl;
664
+ this.baseCdnUrl = descopeConfig.baseCdnUrl;
592
665
  }
593
666
  ngOnInit() {
594
667
  this.setupWebComponent();
@@ -607,27 +680,33 @@ class RoleManagementComponent {
607
680
  if (this.baseStaticUrl) {
608
681
  this.webComponent.setAttribute('base-static-url', this.baseStaticUrl);
609
682
  }
683
+ if (this.baseCdnUrl) {
684
+ this.webComponent.setAttribute('base-cdn-url', this.baseCdnUrl);
685
+ }
610
686
  if (this.theme) {
611
687
  this.webComponent.setAttribute('theme', this.theme);
612
688
  }
613
689
  if (this.debug) {
614
690
  this.webComponent.setAttribute('debug', this.debug.toString());
615
691
  }
692
+ if (this.styleId) {
693
+ this.webComponent.setAttribute('style-id', this.styleId);
694
+ }
616
695
  if (this.logger) {
617
696
  this.webComponent.logger = this.logger;
618
697
  }
619
698
  }
620
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: RoleManagementComponent, deps: [{ token: i0.ElementRef }, { token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
621
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: RoleManagementComponent, isStandalone: true, selector: "role-management[tenant]", inputs: { tenant: "tenant", widgetId: "widgetId", theme: "theme", debug: "debug", logger: "logger" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true }); }
699
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RoleManagementComponent, deps: [{ token: i0.ElementRef }, { token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
700
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: RoleManagementComponent, isStandalone: true, selector: "role-management[tenant]", inputs: { tenant: "tenant", widgetId: "widgetId", theme: "theme", debug: "debug", logger: "logger", styleId: "styleId" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true }); }
622
701
  }
623
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: RoleManagementComponent, decorators: [{
702
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RoleManagementComponent, decorators: [{
624
703
  type: Component,
625
704
  args: [{
626
705
  selector: 'role-management[tenant]',
627
706
  standalone: true,
628
707
  template: ''
629
708
  }]
630
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: DescopeAuthConfig }]; }, propDecorators: { tenant: [{
709
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: DescopeAuthConfig }], propDecorators: { tenant: [{
631
710
  type: Input
632
711
  }], widgetId: [{
633
712
  type: Input
@@ -637,6 +716,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
637
716
  type: Input
638
717
  }], logger: [{
639
718
  type: Input
719
+ }], styleId: [{
720
+ type: Input
640
721
  }] } });
641
722
 
642
723
  class AccessKeyManagementComponent {
@@ -646,6 +727,7 @@ class AccessKeyManagementComponent {
646
727
  this.projectId = descopeConfig.projectId;
647
728
  this.baseUrl = descopeConfig.baseUrl;
648
729
  this.baseStaticUrl = descopeConfig.baseStaticUrl;
730
+ this.baseCdnUrl = descopeConfig.baseCdnUrl;
649
731
  }
650
732
  ngOnInit() {
651
733
  this.setupWebComponent();
@@ -664,6 +746,9 @@ class AccessKeyManagementComponent {
664
746
  if (this.baseStaticUrl) {
665
747
  this.webComponent.setAttribute('base-static-url', this.baseStaticUrl);
666
748
  }
749
+ if (this.baseCdnUrl) {
750
+ this.webComponent.setAttribute('base-cdn-url', this.baseCdnUrl);
751
+ }
667
752
  if (this.theme) {
668
753
  this.webComponent.setAttribute('theme', this.theme);
669
754
  }
@@ -674,17 +759,17 @@ class AccessKeyManagementComponent {
674
759
  this.webComponent.logger = this.logger;
675
760
  }
676
761
  }
677
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: AccessKeyManagementComponent, deps: [{ token: i0.ElementRef }, { token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
678
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: AccessKeyManagementComponent, isStandalone: true, selector: "access-key-management[tenant]", inputs: { tenant: "tenant", widgetId: "widgetId", theme: "theme", debug: "debug", logger: "logger" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true }); }
762
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: AccessKeyManagementComponent, deps: [{ token: i0.ElementRef }, { token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
763
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: AccessKeyManagementComponent, isStandalone: true, selector: "access-key-management[tenant]", inputs: { tenant: "tenant", widgetId: "widgetId", theme: "theme", debug: "debug", logger: "logger", styleId: "styleId" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true }); }
679
764
  }
680
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: AccessKeyManagementComponent, decorators: [{
765
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: AccessKeyManagementComponent, decorators: [{
681
766
  type: Component,
682
767
  args: [{
683
768
  selector: 'access-key-management[tenant]',
684
769
  standalone: true,
685
770
  template: ''
686
771
  }]
687
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: DescopeAuthConfig }]; }, propDecorators: { tenant: [{
772
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: DescopeAuthConfig }], propDecorators: { tenant: [{
688
773
  type: Input
689
774
  }], widgetId: [{
690
775
  type: Input
@@ -694,6 +779,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
694
779
  type: Input
695
780
  }], logger: [{
696
781
  type: Input
782
+ }], styleId: [{
783
+ type: Input
697
784
  }] } });
698
785
 
699
786
  class AuditManagementComponent {
@@ -703,6 +790,7 @@ class AuditManagementComponent {
703
790
  this.projectId = descopeConfig.projectId;
704
791
  this.baseUrl = descopeConfig.baseUrl;
705
792
  this.baseStaticUrl = descopeConfig.baseStaticUrl;
793
+ this.baseCdnUrl = descopeConfig.baseCdnUrl;
706
794
  }
707
795
  ngOnInit() {
708
796
  this.setupWebComponent();
@@ -721,27 +809,33 @@ class AuditManagementComponent {
721
809
  if (this.baseStaticUrl) {
722
810
  this.webComponent.setAttribute('base-static-url', this.baseStaticUrl);
723
811
  }
812
+ if (this.baseCdnUrl) {
813
+ this.webComponent.setAttribute('base-cdn-url', this.baseCdnUrl);
814
+ }
724
815
  if (this.theme) {
725
816
  this.webComponent.setAttribute('theme', this.theme);
726
817
  }
727
818
  if (this.debug) {
728
819
  this.webComponent.setAttribute('debug', this.debug.toString());
729
820
  }
821
+ if (this.styleId) {
822
+ this.webComponent.setAttribute('style-id', this.styleId);
823
+ }
730
824
  if (this.logger) {
731
825
  this.webComponent.logger = this.logger;
732
826
  }
733
827
  }
734
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: AuditManagementComponent, deps: [{ token: i0.ElementRef }, { token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
735
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: AuditManagementComponent, isStandalone: true, selector: "audit-management[tenant]", inputs: { tenant: "tenant", widgetId: "widgetId", theme: "theme", debug: "debug", logger: "logger" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true }); }
828
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: AuditManagementComponent, deps: [{ token: i0.ElementRef }, { token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
829
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: AuditManagementComponent, isStandalone: true, selector: "audit-management[tenant]", inputs: { tenant: "tenant", widgetId: "widgetId", theme: "theme", debug: "debug", logger: "logger", styleId: "styleId" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true }); }
736
830
  }
737
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: AuditManagementComponent, decorators: [{
831
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: AuditManagementComponent, decorators: [{
738
832
  type: Component,
739
833
  args: [{
740
834
  selector: 'audit-management[tenant]',
741
835
  standalone: true,
742
836
  template: ''
743
837
  }]
744
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: DescopeAuthConfig }]; }, propDecorators: { tenant: [{
838
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: DescopeAuthConfig }], propDecorators: { tenant: [{
745
839
  type: Input
746
840
  }], widgetId: [{
747
841
  type: Input
@@ -751,16 +845,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
751
845
  type: Input
752
846
  }], logger: [{
753
847
  type: Input
848
+ }], styleId: [{
849
+ type: Input
754
850
  }] } });
755
851
 
756
852
  class UserProfileComponent {
757
- constructor(elementRef, descopeConfig) {
853
+ constructor(elementRef, descopeConfig, descopeAuthService) {
758
854
  this.elementRef = elementRef;
855
+ this.descopeAuthService = descopeAuthService;
759
856
  this.logout = new EventEmitter();
760
857
  this.webComponent = new DescopeUserProfileWidget();
761
858
  this.projectId = descopeConfig.projectId;
762
859
  this.baseUrl = descopeConfig.baseUrl;
763
860
  this.baseStaticUrl = descopeConfig.baseStaticUrl;
861
+ this.baseCdnUrl = descopeConfig.baseCdnUrl;
862
+ }
863
+ ngOnInit() {
864
+ this.setupWebComponent();
865
+ this.elementRef.nativeElement.appendChild(this.webComponent);
866
+ }
867
+ ngOnChanges() {
868
+ this.setupWebComponent();
869
+ }
870
+ setupWebComponent() {
871
+ this.webComponent.setAttribute('project-id', this.projectId);
872
+ this.webComponent.setAttribute('widget-id', this.widgetId);
873
+ if (this.baseUrl) {
874
+ this.webComponent.setAttribute('base-url', this.baseUrl);
875
+ }
876
+ if (this.baseStaticUrl) {
877
+ this.webComponent.setAttribute('base-static-url', this.baseStaticUrl);
878
+ }
879
+ if (this.baseCdnUrl) {
880
+ this.webComponent.setAttribute('base-cdn-url', this.baseCdnUrl);
881
+ }
882
+ if (this.theme) {
883
+ this.webComponent.setAttribute('theme', this.theme);
884
+ }
885
+ if (this.debug) {
886
+ this.webComponent.setAttribute('debug', this.debug.toString());
887
+ }
888
+ if (this.styleId) {
889
+ this.webComponent.setAttribute('style-id', this.styleId);
890
+ }
891
+ if (this.logger) {
892
+ this.webComponent.logger = this.logger;
893
+ }
894
+ this.webComponent.addEventListener('logout', (e) => {
895
+ this.logout?.emit(e);
896
+ this.descopeAuthService.setSession('');
897
+ this.descopeAuthService.setIsAuthenticated(false);
898
+ this.descopeAuthService.setUser(null);
899
+ });
900
+ }
901
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: UserProfileComponent, deps: [{ token: i0.ElementRef }, { token: DescopeAuthConfig }, { token: DescopeAuthService }], target: i0.ɵɵFactoryTarget.Component }); }
902
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: UserProfileComponent, isStandalone: true, selector: "user-profile", inputs: { widgetId: "widgetId", theme: "theme", debug: "debug", logger: "logger", styleId: "styleId" }, outputs: { logout: "logout" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true }); }
903
+ }
904
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: UserProfileComponent, decorators: [{
905
+ type: Component,
906
+ args: [{
907
+ selector: 'user-profile',
908
+ standalone: true,
909
+ template: ''
910
+ }]
911
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: DescopeAuthConfig }, { type: DescopeAuthService }], propDecorators: { widgetId: [{
912
+ type: Input
913
+ }], theme: [{
914
+ type: Input
915
+ }], debug: [{
916
+ type: Input
917
+ }], logger: [{
918
+ type: Input
919
+ }], styleId: [{
920
+ type: Input
921
+ }], logout: [{
922
+ type: Output
923
+ }] } });
924
+
925
+ class ApplicationsPortalComponent {
926
+ constructor(elementRef, descopeConfig) {
927
+ this.elementRef = elementRef;
928
+ this.logout = new EventEmitter();
929
+ this.webComponent = new DescopeApplicationsPortalWidget();
930
+ this.projectId = descopeConfig.projectId;
931
+ this.baseUrl = descopeConfig.baseUrl;
932
+ this.baseStaticUrl = descopeConfig.baseStaticUrl;
933
+ this.baseCdnUrl = descopeConfig.baseCdnUrl;
764
934
  }
765
935
  ngOnInit() {
766
936
  this.setupWebComponent();
@@ -778,6 +948,9 @@ class UserProfileComponent {
778
948
  if (this.baseStaticUrl) {
779
949
  this.webComponent.setAttribute('base-static-url', this.baseStaticUrl);
780
950
  }
951
+ if (this.baseCdnUrl) {
952
+ this.webComponent.setAttribute('base-cdn-url', this.baseCdnUrl);
953
+ }
781
954
  if (this.theme) {
782
955
  this.webComponent.setAttribute('theme', this.theme);
783
956
  }
@@ -787,23 +960,26 @@ class UserProfileComponent {
787
960
  if (this.logger) {
788
961
  this.webComponent.logger = this.logger;
789
962
  }
963
+ if (this.styleId) {
964
+ this.webComponent.setAttribute('style-id', this.styleId);
965
+ }
790
966
  if (this.logout) {
791
967
  this.webComponent.addEventListener('logout', (e) => {
792
968
  this.logout?.emit(e);
793
969
  });
794
970
  }
795
971
  }
796
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: UserProfileComponent, deps: [{ token: i0.ElementRef }, { token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
797
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: UserProfileComponent, isStandalone: true, selector: "user-profile", inputs: { widgetId: "widgetId", theme: "theme", debug: "debug", logger: "logger" }, outputs: { logout: "logout" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true }); }
972
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ApplicationsPortalComponent, deps: [{ token: i0.ElementRef }, { token: DescopeAuthConfig }], target: i0.ɵɵFactoryTarget.Component }); }
973
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: ApplicationsPortalComponent, isStandalone: true, selector: "applications-portal", inputs: { widgetId: "widgetId", theme: "theme", debug: "debug", logger: "logger", styleId: "styleId" }, outputs: { logout: "logout" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true }); }
798
974
  }
799
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: UserProfileComponent, decorators: [{
975
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ApplicationsPortalComponent, decorators: [{
800
976
  type: Component,
801
977
  args: [{
802
- selector: 'user-profile',
978
+ selector: 'applications-portal',
803
979
  standalone: true,
804
980
  template: ''
805
981
  }]
806
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: DescopeAuthConfig }]; }, propDecorators: { widgetId: [{
982
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: DescopeAuthConfig }], propDecorators: { widgetId: [{
807
983
  type: Input
808
984
  }], theme: [{
809
985
  type: Input
@@ -811,6 +987,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
811
987
  type: Input
812
988
  }], logger: [{
813
989
  type: Input
990
+ }], styleId: [{
991
+ type: Input
814
992
  }], logout: [{
815
993
  type: Output
816
994
  }] } });
@@ -818,7 +996,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
818
996
  class DescopeAuthModule {
819
997
  constructor(parentModule) {
820
998
  if (parentModule) {
821
- throw new Error('DescopeAuthModule is already loaded. Import it only once');
999
+ // eslint-disable-next-line no-console
1000
+ console.log('DescopeAuthModule is loaded in a child module');
822
1001
  }
823
1002
  }
824
1003
  static forRoot(config) {
@@ -827,8 +1006,8 @@ class DescopeAuthModule {
827
1006
  providers: [{ provide: DescopeAuthConfig, useValue: config }]
828
1007
  };
829
1008
  }
830
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: DescopeAuthModule, deps: [{ token: DescopeAuthModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
831
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.9", ngImport: i0, type: DescopeAuthModule, imports: [DescopeComponent,
1009
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: DescopeAuthModule, deps: [{ token: DescopeAuthModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
1010
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.4", ngImport: i0, type: DescopeAuthModule, imports: [DescopeComponent,
832
1011
  SignInFlowComponent,
833
1012
  SignUpFlowComponent,
834
1013
  SignUpOrInFlowComponent,
@@ -836,7 +1015,8 @@ class DescopeAuthModule {
836
1015
  RoleManagementComponent,
837
1016
  AccessKeyManagementComponent,
838
1017
  AuditManagementComponent,
839
- UserProfileComponent], exports: [DescopeComponent,
1018
+ UserProfileComponent,
1019
+ ApplicationsPortalComponent], exports: [DescopeComponent,
840
1020
  SignInFlowComponent,
841
1021
  SignUpFlowComponent,
842
1022
  SignUpOrInFlowComponent,
@@ -844,10 +1024,11 @@ class DescopeAuthModule {
844
1024
  RoleManagementComponent,
845
1025
  AccessKeyManagementComponent,
846
1026
  AuditManagementComponent,
847
- UserProfileComponent] }); }
848
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: DescopeAuthModule }); }
1027
+ UserProfileComponent,
1028
+ ApplicationsPortalComponent] }); }
1029
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: DescopeAuthModule }); }
849
1030
  }
850
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: DescopeAuthModule, decorators: [{
1031
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: DescopeAuthModule, decorators: [{
851
1032
  type: NgModule,
852
1033
  args: [{
853
1034
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
@@ -860,7 +1041,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
860
1041
  RoleManagementComponent,
861
1042
  AccessKeyManagementComponent,
862
1043
  AuditManagementComponent,
863
- UserProfileComponent
1044
+ UserProfileComponent,
1045
+ ApplicationsPortalComponent
864
1046
  ],
865
1047
  exports: [
866
1048
  DescopeComponent,
@@ -871,14 +1053,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
871
1053
  RoleManagementComponent,
872
1054
  AccessKeyManagementComponent,
873
1055
  AuditManagementComponent,
874
- UserProfileComponent
1056
+ UserProfileComponent,
1057
+ ApplicationsPortalComponent
875
1058
  ]
876
1059
  }]
877
- }], ctorParameters: function () { return [{ type: DescopeAuthModule, decorators: [{
1060
+ }], ctorParameters: () => [{ type: DescopeAuthModule, decorators: [{
878
1061
  type: Optional
879
1062
  }, {
880
1063
  type: SkipSelf
881
- }] }]; } });
1064
+ }] }] });
882
1065
 
883
1066
  /*
884
1067
  * Public API Surface of angular-sdk
@@ -888,5 +1071,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
888
1071
  * Generated bundle index. Do not edit.
889
1072
  */
890
1073
 
891
- export { AccessKeyManagementComponent, AuditManagementComponent, DescopeAuthConfig, DescopeAuthModule, DescopeAuthService, DescopeComponent, RoleManagementComponent, SignInFlowComponent, SignUpFlowComponent, SignUpOrInFlowComponent, UserManagementComponent, UserProfileComponent, descopeAuthGuard, descopeInterceptor };
1074
+ export { AccessKeyManagementComponent, ApplicationsPortalComponent, AuditManagementComponent, DescopeAuthConfig, DescopeAuthModule, DescopeAuthService, DescopeComponent, RoleManagementComponent, SignInFlowComponent, SignUpFlowComponent, SignUpOrInFlowComponent, UserManagementComponent, UserProfileComponent, descopeAuthGuard, descopeInterceptor };
892
1075
  //# sourceMappingURL=descope-angular-sdk.mjs.map