@descope/angular-sdk 0.18.2 → 0.18.3
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/dist/esm2022/environment.mjs +2 -2
- package/dist/esm2022/lib/components/access-key-management/access-key-management.component.mjs +3 -2
- package/dist/esm2022/lib/components/audit-management/audit-management.component.mjs +3 -2
- package/dist/esm2022/lib/components/descope/descope.component.mjs +106 -70
- package/dist/esm2022/lib/components/role-management/role-management.component.mjs +3 -2
- package/dist/esm2022/lib/components/sign-in-flow/sign-in-flow.component.mjs +3 -3
- package/dist/esm2022/lib/components/sign-up-flow/sign-up-flow.component.mjs +3 -3
- package/dist/esm2022/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.mjs +3 -3
- package/dist/esm2022/lib/components/user-management/user-management.component.mjs +3 -2
- package/dist/fesm2022/descope-angular-sdk.mjs +114 -73
- package/dist/fesm2022/descope-angular-sdk.mjs.map +1 -1
- package/dist/lib/components/descope/descope.component.d.ts +11 -5
- package/package.json +11 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
1
|
+
import { Component, Input, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
2
2
|
import DescopeUserManagementWidget from '@descope/user-management-widget';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "../../types/types";
|
|
@@ -52,6 +52,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
52
52
|
args: [{
|
|
53
53
|
selector: 'user-management[tenant]',
|
|
54
54
|
standalone: true,
|
|
55
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
55
56
|
template: ''
|
|
56
57
|
}]
|
|
57
58
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.DescopeAuthConfig }], propDecorators: { tenant: [{
|
|
@@ -67,4 +68,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
67
68
|
}], styleId: [{
|
|
68
69
|
type: Input
|
|
69
70
|
}] } });
|
|
70
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
71
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1tYW5hZ2VtZW50LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItc2RrL3NyYy9saWIvY29tcG9uZW50cy91c2VyLW1hbmFnZW1lbnQvdXNlci1tYW5hZ2VtZW50LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsU0FBUyxFQUVULEtBQUssRUFHTCxzQkFBc0IsRUFDdkIsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTywyQkFBMkIsTUFBTSxpQ0FBaUMsQ0FBQzs7O0FBVTFFLE1BQU0sT0FBTyx1QkFBdUI7SUFlbEMsWUFDVSxVQUFzQixFQUM5QixhQUFnQztRQUR4QixlQUFVLEdBQVYsVUFBVSxDQUFZO1FBSGYsaUJBQVksR0FBRyxJQUFJLDJCQUEyQixFQUFFLENBQUM7UUFNaEUsSUFBSSxDQUFDLFNBQVMsR0FBRyxhQUFhLENBQUMsU0FBUyxDQUFDO1FBQ3pDLElBQUksQ0FBQyxPQUFPLEdBQUcsYUFBYSxDQUFDLE9BQU8sQ0FBQztRQUNyQyxJQUFJLENBQUMsYUFBYSxHQUFHLGFBQWEsQ0FBQyxhQUFhLENBQUM7UUFDakQsSUFBSSxDQUFDLFVBQVUsR0FBRyxhQUFhLENBQUMsVUFBVSxDQUFDO0lBQzdDLENBQUM7SUFFRCxRQUFRO1FBQ04sSUFBSSxDQUFDLGlCQUFpQixFQUFFLENBQUM7UUFDekIsSUFBSSxDQUFDLFVBQVUsQ0FBQyxhQ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zLndlYkNvbXBvbmVudC5zZXRBdHRyaWJ1dGUoJ2Jhc2Utc3RhdGljLXVybCcsIHRoaXMuYmFzZVN0YXRpY1VybCk7XG4gICAgfVxuICAgIGlmICh0aGlzLmJhc2VDZG5VcmwpIHtcbiAgICAgIHRoaXMud2ViQ29tcG9uZW50LnNldEF0dHJpYnV0ZSgnYmFzZS1jZG4tdXJsJywgdGhpcy5iYXNlQ2RuVXJsKTtcbiAgICB9XG4gICAgaWYgKHRoaXMudGhlbWUpIHtcbiAgICAgIHRoaXMud2ViQ29tcG9uZW50LnNldEF0dHJpYnV0ZSgndGhlbWUnLCB0aGlzLnRoZW1lKTtcbiAgICB9XG4gICAgaWYgKHRoaXMuZGVidWcpIHtcbiAgICAgIHRoaXMud2ViQ29tcG9uZW50LnNldEF0dHJpYnV0ZSgnZGVidWcnLCB0aGlzLmRlYnVnLnRvU3RyaW5nKCkpO1xuICAgIH1cbiAgICBpZiAodGhpcy5zdHlsZUlkKSB7XG4gICAgICB0aGlzLndlYkNvbXBvbmVudC5zZXRBdHRyaWJ1dGUoJ3N0eWxlLWlkJywgdGhpcy5zdHlsZUlkKTtcbiAgICB9XG5cbiAgICBpZiAodGhpcy5sb2dnZXIpIHtcbiAgICAgICh0aGlzLndlYkNvbXBvbmVudCBhcyBhbnkpLmxvZ2dlciA9IHRoaXMubG9nZ2VyO1xuICAgIH1cbiAgfVxufVxuIl19
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject, EventEmitter, Component, Input, Output, NgModule,
|
|
2
|
+
import { Injectable, inject, EventEmitter, Component, CUSTOM_ELEMENTS_SCHEMA, ViewChild, Input, Output, NgModule, Optional, SkipSelf } from '@angular/core';
|
|
3
3
|
import createSdk from '@descope/web-js-sdk';
|
|
4
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
|
-
import
|
|
7
|
+
import DescopeWc from '@descope/web-component';
|
|
8
8
|
import DescopeUserManagementWidget from '@descope/user-management-widget';
|
|
9
9
|
import DescopeRoleManagementWidget from '@descope/role-management-widget';
|
|
10
10
|
import DescopeAccessKeyManagementWidget from '@descope/access-key-management-widget';
|
|
@@ -39,7 +39,7 @@ function observabilify(value) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
const environment = {
|
|
42
|
-
buildVersion: '0.18.
|
|
42
|
+
buildVersion: '0.18.3'
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
const baseHeaders = {
|
|
@@ -250,13 +250,37 @@ const descopeInterceptor = (request, next) => {
|
|
|
250
250
|
};
|
|
251
251
|
|
|
252
252
|
class DescopeComponent {
|
|
253
|
+
get clientString() {
|
|
254
|
+
if (!this.client)
|
|
255
|
+
return undefined;
|
|
256
|
+
try {
|
|
257
|
+
return JSON.stringify(this.client);
|
|
258
|
+
}
|
|
259
|
+
catch {
|
|
260
|
+
return undefined;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
get nonceString() {
|
|
264
|
+
if (!this.nonce)
|
|
265
|
+
return undefined;
|
|
266
|
+
return typeof this.nonce === 'string' ? this.nonce : undefined;
|
|
267
|
+
}
|
|
268
|
+
get formString() {
|
|
269
|
+
if (!this.form)
|
|
270
|
+
return undefined;
|
|
271
|
+
try {
|
|
272
|
+
return JSON.stringify(this.form);
|
|
273
|
+
}
|
|
274
|
+
catch {
|
|
275
|
+
return undefined;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
253
278
|
constructor(elementRef, authService, descopeConfig) {
|
|
254
279
|
this.elementRef = elementRef;
|
|
255
280
|
this.authService = authService;
|
|
256
281
|
this.success = new EventEmitter();
|
|
257
282
|
this.error = new EventEmitter();
|
|
258
283
|
this.ready = new EventEmitter();
|
|
259
|
-
this.webComponent = new DescopeWebComponent();
|
|
260
284
|
this.projectId = descopeConfig.projectId;
|
|
261
285
|
this.baseUrl = descopeConfig.baseUrl;
|
|
262
286
|
this.baseStaticUrl = descopeConfig.baseStaticUrl;
|
|
@@ -264,9 +288,8 @@ class DescopeComponent {
|
|
|
264
288
|
this.storeLastAuthenticatedUser = descopeConfig.storeLastAuthenticatedUser;
|
|
265
289
|
}
|
|
266
290
|
ngOnInit() {
|
|
267
|
-
const sdk = this.authService.descopeSdk;
|
|
268
|
-
|
|
269
|
-
WebComponent.sdkConfigOverrides = {
|
|
291
|
+
const sdk = this.authService.descopeSdk;
|
|
292
|
+
DescopeWc.sdkConfigOverrides = {
|
|
270
293
|
// Overrides the web-component's base headers to indicate usage via the React SDK
|
|
271
294
|
baseHeaders,
|
|
272
295
|
// Disables token persistence within the web-component to delegate token management
|
|
@@ -286,78 +309,36 @@ class DescopeComponent {
|
|
|
286
309
|
}
|
|
287
310
|
}
|
|
288
311
|
};
|
|
289
|
-
this.setupWebComponent();
|
|
290
|
-
this.elementRef.nativeElement.appendChild(this.webComponent);
|
|
291
312
|
}
|
|
292
|
-
|
|
293
|
-
this.
|
|
313
|
+
ngAfterViewInit() {
|
|
314
|
+
if (!this.descopeWc?.nativeElement)
|
|
315
|
+
return;
|
|
316
|
+
this.webComponent = this.descopeWc.nativeElement;
|
|
317
|
+
this.setupNonAttributeProperties();
|
|
318
|
+
this.setupEventListeners();
|
|
294
319
|
}
|
|
295
|
-
|
|
296
|
-
this.webComponent
|
|
297
|
-
|
|
298
|
-
if (this.baseUrl) {
|
|
299
|
-
this.webComponent.setAttribute('base-url', this.baseUrl);
|
|
300
|
-
}
|
|
301
|
-
if (this.baseStaticUrl) {
|
|
302
|
-
this.webComponent.setAttribute('base-static-url', this.baseStaticUrl);
|
|
303
|
-
}
|
|
304
|
-
if (this.baseCdnUrl) {
|
|
305
|
-
this.webComponent.setAttribute('base-cdn-url', this.baseCdnUrl);
|
|
306
|
-
}
|
|
307
|
-
if (this.storeLastAuthenticatedUser) {
|
|
308
|
-
this.webComponent.setAttribute('store-last-authenticated-user', this.storeLastAuthenticatedUser.toString());
|
|
309
|
-
}
|
|
310
|
-
if (this.locale) {
|
|
311
|
-
this.webComponent.setAttribute('locale', this.locale);
|
|
312
|
-
}
|
|
313
|
-
if (this.theme) {
|
|
314
|
-
this.webComponent.setAttribute('theme', this.theme);
|
|
315
|
-
}
|
|
316
|
-
if (this.tenant) {
|
|
317
|
-
this.webComponent.setAttribute('tenant', this.tenant);
|
|
318
|
-
}
|
|
319
|
-
if (this.telemetryKey) {
|
|
320
|
-
this.webComponent.setAttribute('telemetryKey', this.telemetryKey);
|
|
321
|
-
}
|
|
322
|
-
if (this.redirectUrl) {
|
|
323
|
-
this.webComponent.setAttribute('redirect-url', this.redirectUrl);
|
|
324
|
-
}
|
|
325
|
-
if (this.autoFocus) {
|
|
326
|
-
this.webComponent.setAttribute('auto-focus', this.autoFocus.toString());
|
|
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
|
-
}
|
|
334
|
-
if (this.debug) {
|
|
335
|
-
this.webComponent.setAttribute('debug', this.debug.toString());
|
|
336
|
-
}
|
|
337
|
-
if (this.styleId) {
|
|
338
|
-
this.webComponent.setAttribute('style-id', this.styleId);
|
|
320
|
+
ngOnChanges() {
|
|
321
|
+
if (this.webComponent) {
|
|
322
|
+
this.setupNonAttributeProperties();
|
|
339
323
|
}
|
|
324
|
+
}
|
|
325
|
+
setupNonAttributeProperties() {
|
|
326
|
+
if (!this.webComponent)
|
|
327
|
+
return;
|
|
328
|
+
// Handle non-attribute properties
|
|
340
329
|
if (this.errorTransformer) {
|
|
341
330
|
this.webComponent.errorTransformer = this.errorTransformer;
|
|
342
331
|
}
|
|
343
332
|
if (this.onScreenUpdate) {
|
|
344
333
|
this.webComponent.onScreenUpdate = this.onScreenUpdate;
|
|
345
334
|
}
|
|
346
|
-
if (this.client) {
|
|
347
|
-
this.webComponent.setAttribute('client', JSON.stringify(this.client));
|
|
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
|
-
}
|
|
355
|
-
if (this.form) {
|
|
356
|
-
this.webComponent.setAttribute('form', JSON.stringify(this.form));
|
|
357
|
-
}
|
|
358
335
|
if (this.logger) {
|
|
359
336
|
this.webComponent.logger = this.logger;
|
|
360
337
|
}
|
|
338
|
+
}
|
|
339
|
+
setupEventListeners() {
|
|
340
|
+
if (!this.webComponent)
|
|
341
|
+
return;
|
|
361
342
|
this.webComponent.addEventListener('success', (e) => {
|
|
362
343
|
from(this.authService.descopeSdk.httpClient.hooks?.afterRequest(
|
|
363
344
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -379,16 +360,72 @@ class DescopeComponent {
|
|
|
379
360
|
}
|
|
380
361
|
}
|
|
381
362
|
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" },
|
|
363
|
+
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" }, viewQueries: [{ propertyName: "descopeWc", first: true, predicate: ["descopeWc"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
364
|
+
<descope-wc
|
|
365
|
+
#descopeWc
|
|
366
|
+
[attr.project-id]="projectId"
|
|
367
|
+
[attr.flow-id]="flowId"
|
|
368
|
+
[attr.base-url]="baseUrl"
|
|
369
|
+
[attr.base-static-url]="baseStaticUrl"
|
|
370
|
+
[attr.base-cdn-url]="baseCdnUrl"
|
|
371
|
+
[attr.store-last-authenticated-user]="storeLastAuthenticatedUser"
|
|
372
|
+
[attr.theme]="theme"
|
|
373
|
+
[attr.locale]="locale"
|
|
374
|
+
[attr.tenant]="tenant"
|
|
375
|
+
[attr.telemetry-key]="telemetryKey"
|
|
376
|
+
[attr.redirect-url]="redirectUrl"
|
|
377
|
+
[attr.auto-focus]="autoFocus"
|
|
378
|
+
[attr.validate-on-blur]="validateOnBlur"
|
|
379
|
+
[attr.restart-on-error]="restartOnError"
|
|
380
|
+
[attr.debug]="debug"
|
|
381
|
+
[attr.style-id]="styleId"
|
|
382
|
+
[attr.client]="clientString"
|
|
383
|
+
[attr.nonce]="nonceString"
|
|
384
|
+
[attr.dismiss-screen-error-on-input]="dismissScreenErrorOnInput"
|
|
385
|
+
[attr.form]="formString"
|
|
386
|
+
>
|
|
387
|
+
<ng-content></ng-content>
|
|
388
|
+
</descope-wc>
|
|
389
|
+
`, isInline: true }); }
|
|
383
390
|
}
|
|
384
391
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: DescopeComponent, decorators: [{
|
|
385
392
|
type: Component,
|
|
386
393
|
args: [{
|
|
387
394
|
selector: 'descope[flowId]',
|
|
388
395
|
standalone: true,
|
|
389
|
-
|
|
396
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
397
|
+
template: `
|
|
398
|
+
<descope-wc
|
|
399
|
+
#descopeWc
|
|
400
|
+
[attr.project-id]="projectId"
|
|
401
|
+
[attr.flow-id]="flowId"
|
|
402
|
+
[attr.base-url]="baseUrl"
|
|
403
|
+
[attr.base-static-url]="baseStaticUrl"
|
|
404
|
+
[attr.base-cdn-url]="baseCdnUrl"
|
|
405
|
+
[attr.store-last-authenticated-user]="storeLastAuthenticatedUser"
|
|
406
|
+
[attr.theme]="theme"
|
|
407
|
+
[attr.locale]="locale"
|
|
408
|
+
[attr.tenant]="tenant"
|
|
409
|
+
[attr.telemetry-key]="telemetryKey"
|
|
410
|
+
[attr.redirect-url]="redirectUrl"
|
|
411
|
+
[attr.auto-focus]="autoFocus"
|
|
412
|
+
[attr.validate-on-blur]="validateOnBlur"
|
|
413
|
+
[attr.restart-on-error]="restartOnError"
|
|
414
|
+
[attr.debug]="debug"
|
|
415
|
+
[attr.style-id]="styleId"
|
|
416
|
+
[attr.client]="clientString"
|
|
417
|
+
[attr.nonce]="nonceString"
|
|
418
|
+
[attr.dismiss-screen-error-on-input]="dismissScreenErrorOnInput"
|
|
419
|
+
[attr.form]="formString"
|
|
420
|
+
>
|
|
421
|
+
<ng-content></ng-content>
|
|
422
|
+
</descope-wc>
|
|
423
|
+
`
|
|
390
424
|
}]
|
|
391
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: DescopeAuthService }, { type: DescopeAuthConfig }], propDecorators: {
|
|
425
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: DescopeAuthService }, { type: DescopeAuthConfig }], propDecorators: { descopeWc: [{
|
|
426
|
+
type: ViewChild,
|
|
427
|
+
args: ['descopeWc']
|
|
428
|
+
}], flowId: [{
|
|
392
429
|
type: Input
|
|
393
430
|
}], locale: [{
|
|
394
431
|
type: Input
|
|
@@ -443,7 +480,7 @@ class SignInFlowComponent {
|
|
|
443
480
|
}
|
|
444
481
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SignInFlowComponent, decorators: [{
|
|
445
482
|
type: Component,
|
|
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" }]
|
|
483
|
+
args: [{ selector: 'descope-sign-in-flow', standalone: true, imports: [DescopeComponent], schemas: [CUSTOM_ELEMENTS_SCHEMA], 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
484
|
}], ctorParameters: () => [{ type: DescopeAuthConfig }], propDecorators: { locale: [{
|
|
448
485
|
type: Input
|
|
449
486
|
}], theme: [{
|
|
@@ -495,7 +532,7 @@ class SignUpFlowComponent {
|
|
|
495
532
|
}
|
|
496
533
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SignUpFlowComponent, decorators: [{
|
|
497
534
|
type: Component,
|
|
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" }]
|
|
535
|
+
args: [{ selector: 'descope-sign-up-flow', standalone: true, imports: [DescopeComponent], schemas: [CUSTOM_ELEMENTS_SCHEMA], 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
536
|
}], ctorParameters: () => [{ type: DescopeAuthConfig }], propDecorators: { locale: [{
|
|
500
537
|
type: Input
|
|
501
538
|
}], theme: [{
|
|
@@ -547,7 +584,7 @@ class SignUpOrInFlowComponent {
|
|
|
547
584
|
}
|
|
548
585
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SignUpOrInFlowComponent, decorators: [{
|
|
549
586
|
type: Component,
|
|
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" }]
|
|
587
|
+
args: [{ selector: 'descope-sign-up-or-in-flow', standalone: true, imports: [DescopeComponent], schemas: [CUSTOM_ELEMENTS_SCHEMA], 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
588
|
}], ctorParameters: () => [{ type: DescopeAuthConfig }], propDecorators: { locale: [{
|
|
552
589
|
type: Input
|
|
553
590
|
}], theme: [{
|
|
@@ -638,6 +675,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
638
675
|
args: [{
|
|
639
676
|
selector: 'user-management[tenant]',
|
|
640
677
|
standalone: true,
|
|
678
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
641
679
|
template: ''
|
|
642
680
|
}]
|
|
643
681
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: DescopeAuthConfig }], propDecorators: { tenant: [{
|
|
@@ -704,6 +742,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
704
742
|
args: [{
|
|
705
743
|
selector: 'role-management[tenant]',
|
|
706
744
|
standalone: true,
|
|
745
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
707
746
|
template: ''
|
|
708
747
|
}]
|
|
709
748
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: DescopeAuthConfig }], propDecorators: { tenant: [{
|
|
@@ -767,6 +806,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
767
806
|
args: [{
|
|
768
807
|
selector: 'access-key-management[tenant]',
|
|
769
808
|
standalone: true,
|
|
809
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
770
810
|
template: ''
|
|
771
811
|
}]
|
|
772
812
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: DescopeAuthConfig }], propDecorators: { tenant: [{
|
|
@@ -833,6 +873,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
833
873
|
args: [{
|
|
834
874
|
selector: 'audit-management[tenant]',
|
|
835
875
|
standalone: true,
|
|
876
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
836
877
|
template: ''
|
|
837
878
|
}]
|
|
838
879
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: DescopeAuthConfig }], propDecorators: { tenant: [{
|