@odx/auth 17.2.1 → 18.0.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 +82 -0
- package/fesm2022/odx-auth-plugins-service-connect.mjs +3 -3
- package/fesm2022/odx-auth-plugins-service-connect.mjs.map +1 -1
- package/fesm2022/odx-auth.mjs +42 -42
- package/fesm2022/odx-auth.mjs.map +1 -1
- package/index.d.ts +744 -15
- package/package.json +4 -8
- package/plugins/service-connect/index.d.ts +184 -8
- package/esm2022/index.mjs +0 -16
- package/esm2022/lib/auth.component.mjs +0 -50
- package/esm2022/lib/auth.config.mjs +0 -71
- package/esm2022/lib/auth.directive.mjs +0 -51
- package/esm2022/lib/auth.guard.mjs +0 -44
- package/esm2022/lib/auth.i18n.mjs +0 -13
- package/esm2022/lib/auth.interceptor.mjs +0 -23
- package/esm2022/lib/auth.logger.mjs +0 -3
- package/esm2022/lib/auth.module.mjs +0 -19
- package/esm2022/lib/auth.providers.mjs +0 -136
- package/esm2022/lib/auth.service.mjs +0 -317
- package/esm2022/lib/auth.typings.mjs +0 -2
- package/esm2022/lib/components/auth-actions/auth-actions.component.mjs +0 -40
- package/esm2022/lib/components/auth-loading-screen/auth-loading-screen.component.mjs +0 -53
- package/esm2022/lib/components/index.mjs +0 -3
- package/esm2022/lib/directives/auth-action.directive.mjs +0 -30
- package/esm2022/lib/directives/index.mjs +0 -4
- package/esm2022/lib/directives/sign-in.directive.mjs +0 -52
- package/esm2022/lib/directives/sign-out.directive.mjs +0 -50
- package/esm2022/lib/helpers/create-auth-host-url.mjs +0 -18
- package/esm2022/lib/helpers/create-inititals.mjs +0 -32
- package/esm2022/lib/helpers/handle-auth-error.mjs +0 -31
- package/esm2022/lib/helpers/handle-oauth-event.mjs +0 -13
- package/esm2022/lib/helpers/index.mjs +0 -9
- package/esm2022/lib/helpers/resolve-email.mjs +0 -34
- package/esm2022/lib/helpers/resolve-username.mjs +0 -38
- package/esm2022/lib/helpers/set-http-auth-header.mjs +0 -22
- package/esm2022/lib/helpers/user-language-loader.mjs +0 -17
- package/esm2022/lib/models/auth-environment.mjs +0 -3
- package/esm2022/lib/models/auth-plugin-manager.mjs +0 -49
- package/esm2022/lib/models/authorized-handler.mjs +0 -2
- package/esm2022/lib/models/index.mjs +0 -5
- package/esm2022/lib/models/offline-auth-error-handler.mjs +0 -7
- package/esm2022/lib/plugins/core-debug.plugin.mjs +0 -29
- package/esm2022/lib/plugins/core-identity.plugin.mjs +0 -20
- package/esm2022/lib/plugins/index.mjs +0 -4
- package/esm2022/lib/plugins/user-profile-link.plugin.mjs +0 -18
- package/esm2022/lib/unauth.guard.mjs +0 -38
- package/esm2022/odx-auth.mjs +0 -5
- package/esm2022/plugins/service-connect/index.mjs +0 -9
- package/esm2022/plugins/service-connect/lib/dtos/get-service-connect-rights-response.dto.mjs +0 -2
- package/esm2022/plugins/service-connect/lib/dtos/get-service-connect-user-response.dto.mjs +0 -2
- package/esm2022/plugins/service-connect/lib/dtos/index.mjs +0 -3
- package/esm2022/plugins/service-connect/lib/helpers/build-service-connect-url.mjs +0 -16
- package/esm2022/plugins/service-connect/lib/helpers/has-roles-or-rights-handler.mjs +0 -12
- package/esm2022/plugins/service-connect/lib/helpers/has-roles-or-rights.mjs +0 -11
- package/esm2022/plugins/service-connect/lib/helpers/index.mjs +0 -5
- package/esm2022/plugins/service-connect/lib/helpers/service-connect-plugin-factory.mjs +0 -25
- package/esm2022/plugins/service-connect/lib/service-connect-rights.directive.mjs +0 -44
- package/esm2022/plugins/service-connect/lib/service-connect-rights.guard.mjs +0 -15
- package/esm2022/plugins/service-connect/lib/service-connect-rights.plugin.mjs +0 -16
- package/esm2022/plugins/service-connect/lib/service-connect-user-language.plugin.mjs +0 -34
- package/esm2022/plugins/service-connect/lib/service-connect-user-profile.plugin.mjs +0 -28
- package/esm2022/plugins/service-connect/lib/service-connect.config.mjs +0 -17
- package/esm2022/plugins/service-connect/odx-auth-plugins-service-connect.mjs +0 -5
- package/lib/auth.component.d.ts +0 -20
- package/lib/auth.config.d.ts +0 -84
- package/lib/auth.directive.d.ts +0 -25
- package/lib/auth.guard.d.ts +0 -11
- package/lib/auth.i18n.d.ts +0 -3
- package/lib/auth.interceptor.d.ts +0 -10
- package/lib/auth.logger.d.ts +0 -3
- package/lib/auth.module.d.ts +0 -10
- package/lib/auth.providers.d.ts +0 -46
- package/lib/auth.service.d.ts +0 -206
- package/lib/auth.typings.d.ts +0 -27
- package/lib/components/auth-actions/auth-actions.component.d.ts +0 -16
- package/lib/components/auth-loading-screen/auth-loading-screen.component.d.ts +0 -24
- package/lib/components/index.d.ts +0 -2
- package/lib/directives/auth-action.directive.d.ts +0 -18
- package/lib/directives/index.d.ts +0 -3
- package/lib/directives/sign-in.directive.d.ts +0 -29
- package/lib/directives/sign-out.directive.d.ts +0 -28
- package/lib/helpers/create-auth-host-url.d.ts +0 -14
- package/lib/helpers/create-inititals.d.ts +0 -18
- package/lib/helpers/handle-auth-error.d.ts +0 -13
- package/lib/helpers/handle-oauth-event.d.ts +0 -11
- package/lib/helpers/index.d.ts +0 -8
- package/lib/helpers/resolve-email.d.ts +0 -21
- package/lib/helpers/resolve-username.d.ts +0 -22
- package/lib/helpers/set-http-auth-header.d.ts +0 -11
- package/lib/helpers/user-language-loader.d.ts +0 -11
- package/lib/models/auth-environment.d.ts +0 -6
- package/lib/models/auth-plugin-manager.d.ts +0 -21
- package/lib/models/authorized-handler.d.ts +0 -3
- package/lib/models/index.d.ts +0 -4
- package/lib/models/offline-auth-error-handler.d.ts +0 -2
- package/lib/plugins/core-debug.plugin.d.ts +0 -11
- package/lib/plugins/core-identity.plugin.d.ts +0 -18
- package/lib/plugins/index.d.ts +0 -3
- package/lib/plugins/user-profile-link.plugin.d.ts +0 -18
- package/lib/unauth.guard.d.ts +0 -11
- package/plugins/service-connect/lib/dtos/get-service-connect-rights-response.dto.d.ts +0 -3
- package/plugins/service-connect/lib/dtos/get-service-connect-user-response.dto.d.ts +0 -14
- package/plugins/service-connect/lib/dtos/index.d.ts +0 -2
- package/plugins/service-connect/lib/helpers/build-service-connect-url.d.ts +0 -10
- package/plugins/service-connect/lib/helpers/has-roles-or-rights-handler.d.ts +0 -10
- package/plugins/service-connect/lib/helpers/has-roles-or-rights.d.ts +0 -11
- package/plugins/service-connect/lib/helpers/index.d.ts +0 -4
- package/plugins/service-connect/lib/helpers/service-connect-plugin-factory.d.ts +0 -20
- package/plugins/service-connect/lib/service-connect-rights.directive.d.ts +0 -21
- package/plugins/service-connect/lib/service-connect-rights.guard.d.ts +0 -11
- package/plugins/service-connect/lib/service-connect-rights.plugin.d.ts +0 -18
- package/plugins/service-connect/lib/service-connect-user-language.plugin.d.ts +0 -24
- package/plugins/service-connect/lib/service-connect-user-profile.plugin.d.ts +0 -23
- package/plugins/service-connect/lib/service-connect.config.d.ts +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,87 @@
|
|
|
1
1
|
# @odx/auth
|
|
2
2
|
|
|
3
|
+
## 18.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- e9b740b: Updates for Angular 20 across the Angular-based libraries. Changes by package are listed below.
|
|
8
|
+
|
|
9
|
+
#### @odx/angular
|
|
10
|
+
|
|
11
|
+
Breaking changes:
|
|
12
|
+
- `IconComponent`: remove `iconSet` input. Use `set` and `name` inputs instead, e.g. `<odx-icon set="core" name="close" />`. Also you can use `name` with `set::name` - `<odx-icon name="core::close" />`.
|
|
13
|
+
- `TimepickerService`: remove `getPlaceholder()`. Use the `useLocale` signal instead.
|
|
14
|
+
- `ModalHeroComponent`: remove `iconSet` input. Use the `icon` input with `set::name` format (e.g., `core::info`).
|
|
15
|
+
- `RailNavigationItemComponent`: remove `iconSet` and `iconName` inputs. Use the `icon` input with `set::name` format (e.g., `core::placeholder`).
|
|
16
|
+
- `ErrorPageConfig`: remove `iconSet`. Use `icon` with `set::name` format (e.g., `core::error`).
|
|
17
|
+
- `Table`: remove `TableSortVariant`. Use `SortDirection` from `@odx/angular/utils` instead.
|
|
18
|
+
- `Table`: remove re-export of `SortDirection` from `@odx/angular/components/data-table`. Import it directly from `@odx/angular/utils`.
|
|
19
|
+
- `ListItemComponent`: remove `danger` input. Use `variant="danger"` instead.
|
|
20
|
+
- `RichListItemHeaderComponent`: remove `odx-rich-list-header` selector. Use `odx-rich-list-item-header` instead.
|
|
21
|
+
- `Datepicker`/`Daterangepicker`: remove deprecated config aliases (`DatepickerConfig`, `DaterangepickerConfig`, etc.). Use `DateConfig`, `provideDateConfig`, `injectDateConfig`, `getDateInputFormat`, `getDateInputMask`, `getDateInputValueAsDate`, and `InputDateOrder` from `@odx/angular/cdk/date-input`.
|
|
22
|
+
- `FormFieldConfig`: remove `updateOn` property as it had no effect.
|
|
23
|
+
- `ToastService`: remove `queue$`, `onAdd$`, `onRemove$`, `add()`, `remove()`, `clear()` (use `toasts$`, `onToastAdd$`, `onToastRemove$`, `create()`, `dismiss()`, `dismissAll()`).
|
|
24
|
+
- `Utils`: remove `trackByIndex` and `trackById`. Use Angular control flow `@for` with `track $index` or `track item.id`.
|
|
25
|
+
|
|
26
|
+
Deprecations:
|
|
27
|
+
- `IconSet`, Use `OdxIconSet` from `@odx/icons` instead.
|
|
28
|
+
- `identifier` in `IconComponent`, use `name` with `set::name` instead.
|
|
29
|
+
- `IconSize`: use `small => sm`, `medium => md`, `large => lg`, `xlarge => xxl`
|
|
30
|
+
|
|
31
|
+
Improvements:
|
|
32
|
+
- Update components and templates for the new icon API and Angular 20 compatibility.
|
|
33
|
+
- Remove previously deprecated internal Angular usages.
|
|
34
|
+
|
|
35
|
+
#### @odx/angular-chart-js
|
|
36
|
+
|
|
37
|
+
Breaking changes:
|
|
38
|
+
- Update peer dependencies to Angular 20 and aligned `@odx/ui` and `@odx/angular` minimum versions.
|
|
39
|
+
- Update charting dependencies (`ng2-charts` 8.x, `chart.js` 4.5.x, `@sgratzl/chartjs-chart-boxplot` 4.4.5).
|
|
40
|
+
|
|
41
|
+
Improvements:
|
|
42
|
+
- Configuration updates for Angular 20 tooling.
|
|
43
|
+
|
|
44
|
+
#### @odx/angular-translate
|
|
45
|
+
|
|
46
|
+
Improvements:
|
|
47
|
+
- Update peer dependency on `@odx/angular` and Angular 20 tooling compatibility.
|
|
48
|
+
- Provider imports aligned with Angular 20 requirements.
|
|
49
|
+
|
|
50
|
+
#### @odx/auth
|
|
51
|
+
|
|
52
|
+
Improvements:
|
|
53
|
+
- Update internal templates to the new icon identifier format.
|
|
54
|
+
|
|
55
|
+
#### @odx/dc-plugins
|
|
56
|
+
|
|
57
|
+
Breaking changes:
|
|
58
|
+
- `DcRailNavItem`: remove `iconSet`/`iconName` usage. Use `icon` with `set::name` format (e.g., `core::home`).
|
|
59
|
+
|
|
60
|
+
Improvements:
|
|
61
|
+
- Update templates to the new icon identifier format.
|
|
62
|
+
|
|
63
|
+
#### @odx/product-fruits
|
|
64
|
+
|
|
65
|
+
Improvements:
|
|
66
|
+
- Update Product Fruits widget icons to the new `set::name` format and icon API.
|
|
67
|
+
- Theme stylesheet updates and Angular 20 tooling alignment.
|
|
68
|
+
|
|
69
|
+
#### @odx/ui
|
|
70
|
+
|
|
71
|
+
Breaking changes:
|
|
72
|
+
- Remove icon-font based usage in UI integration points. Do not import icon font CSS (e.g. `@odx/icons/core/core-icons.css`) anymore.
|
|
73
|
+
- Register icons through runtime imports in your app entrypoint instead: `import '@odx/icons';` and `import '@odx/icons/<set>';` (for example `@odx/icons/core`).
|
|
74
|
+
- In SCSS file import `@use '@odx/icons/scss' as odxIcons;` and add mixin `@include odxIcons.icon('<set>::<name>');`
|
|
75
|
+
|
|
76
|
+
Improvements:
|
|
77
|
+
- AG Grid theme refinements and multiple component style adjustments.
|
|
78
|
+
- Minor typography and breakpoint tweaks.
|
|
79
|
+
|
|
80
|
+
### Patch Changes
|
|
81
|
+
|
|
82
|
+
- Updated dependencies [e9b740b]
|
|
83
|
+
- @odx/angular@13.0.0
|
|
84
|
+
|
|
3
85
|
## 17.2.1
|
|
4
86
|
|
|
5
87
|
### Patch Changes
|
|
@@ -97,10 +97,10 @@ class ServiceConnectRightsDirective {
|
|
|
97
97
|
set rolesOrRights(value) {
|
|
98
98
|
this.authDirective.authorizationHandler = hasRolesOrRightsHandler(value ?? []);
|
|
99
99
|
}
|
|
100
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
101
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
100
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ServiceConnectRightsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
101
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: ServiceConnectRightsDirective, isStandalone: true, selector: "ng-template[odxAuthServiceConnectRights]", inputs: { rolesOrRights: ["odxAuthServiceConnectRights", "rolesOrRights"] }, hostDirectives: [{ directive: i1.AuthDirective, inputs: ["odxAuthElse", "odxAuthServiceConnectRightsElse"] }], ngImport: i0 }); }
|
|
102
102
|
}
|
|
103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ServiceConnectRightsDirective, decorators: [{
|
|
104
104
|
type: Directive,
|
|
105
105
|
args: [{
|
|
106
106
|
standalone: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-auth-plugins-service-connect.mjs","sources":["../../../../libs/auth/plugins/service-connect/src/lib/service-connect.config.ts","../../../../libs/auth/plugins/service-connect/src/lib/helpers/build-service-connect-url.ts","../../../../libs/auth/plugins/service-connect/src/lib/helpers/has-roles-or-rights.ts","../../../../libs/auth/plugins/service-connect/src/lib/helpers/has-roles-or-rights-handler.ts","../../../../libs/auth/plugins/service-connect/src/lib/helpers/service-connect-plugin-factory.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-rights.directive.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-rights.guard.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-rights.plugin.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-user-language.plugin.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-user-profile.plugin.ts","../../../../libs/auth/plugins/service-connect/src/odx-auth-plugins-service-connect.ts"],"sourcesContent":["import { AuthEnvironment } from '@odx/auth';\n\nexport type ServiceConnectEnvironment = { custom: string };\nexport const ServiceConnectEnvironments: Record<AuthEnvironment, string> = {\n [AuthEnvironment.DEV]: 'https://api.test.connect.draeger.com',\n [AuthEnvironment.STAGE]: 'https://api.staging.connect.draeger.com',\n [AuthEnvironment.PROD]: 'https://api.connect.draeger.com',\n};\nexport const ServiceConnectScopes = {\n BASE: 'dcid',\n PROFILE: 'dcid.profile',\n RIGHTS: 'dcid.rights',\n INSTITUTION: 'dcid.institution',\n};\nexport const ServiceConnectEndpoints = {\n user: '/users/me',\n userRights: '/users/me/rights',\n};\n","import { buildUrl, isString } from '@odx/angular/utils';\nimport { AuthEnvironment } from '@odx/auth';\nimport { ServiceConnectEnvironment, ServiceConnectEnvironments } from '../service-connect.config';\n\n/**\n * Builds a service connect URL based on the provided environment and endpoints.\n *\n * @param {ServiceConnectEnvironment | AuthEnvironment} environment - The environment configuration which can be either a `ServiceConnectEnvironment` or `AuthEnvironment`.\n * @param {string[]} endpoints - A list of endpoint strings to be appended to the base URL.\n * @returns {string} - The constructed service connect URL as a string.\n */\nexport function buildServiceConnectUrl(environment: ServiceConnectEnvironment | AuthEnvironment, ...endpoints: string[]): string {\n if (isString(environment)) {\n return buildUrl(ServiceConnectEnvironments[environment], ...endpoints);\n }\n return buildUrl(environment.custom, ...endpoints);\n}\n","export type Right = string | number;\nexport type Role = Right[];\nexport type RolesOrRights = Array<Role | Right>;\n\n/**\n * Checks if the user has any of the specified roles or rights.\n *\n * @param {Right[]} userRights - An array of rights that the user possesses.\n * @param {RolesOrRights} rolesOrRights - An array of roles or rights to check against. A role is represented as an array of rights.\n * @returns {boolean} - `true` if the user has any of the specified roles or rights, otherwise `false`.\n */\nexport function hasRolesOrRights(userRights: Right[], rolesOrRights: RolesOrRights): boolean {\n return rolesOrRights.some((rights) => (Array.isArray(rights) ? rights : [rights])?.every((right) => userRights.includes(right)));\n}\n","import { AuthorizedHandler } from '@odx/auth';\nimport { hasRolesOrRights, RolesOrRights } from './has-roles-or-rights';\n\n/**\n * Creates an authorized handler that checks if the user has the specified roles or rights.\n *\n * @param {RolesOrRights} rolesOrRights - The roles or rights to check against the user's claims.\n * @returns {AuthorizedHandler} - An handler function that takes user claims and returns a boolean indicating\n * whether the user has the required roles or rights.\n */\nexport function hasRolesOrRightsHandler(rolesOrRights: RolesOrRights): AuthorizedHandler {\n return (claims) => hasRolesOrRights(claims?.rights ?? [], rolesOrRights);\n}\n","import { HttpClient, HttpContext } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { AuthPluginFactory, injectAuthConfig, requireAuthentication } from '@odx/auth';\nimport { defer, map } from 'rxjs';\nimport { ServiceConnectEnvironment } from '../service-connect.config';\nimport { buildServiceConnectUrl } from './build-service-connect-url';\n\nexport interface ServiceConnectPluginOptions<Dto = unknown> {\n environment?: ServiceConnectEnvironment;\n additionalClaims?: (dto: (Dto & Record<string, unknown>) | null) => Partial<OdxAuth.AuthPluginResult>;\n}\n\nexport interface ServiceConnectPluginFactoryOptions<Dto> {\n endpoint: string[];\n parseResponse: (res: Dto | null) => Partial<OdxAuth.AuthPluginResult>;\n defaultValue?: Partial<OdxAuth.AuthPluginResult>;\n setup?: (pluginOptions?: ServiceConnectPluginOptions<Dto>) => void;\n}\n\nexport type ServiceConnectPluginFactory<Dto = unknown> = (pluginOptions?: ServiceConnectPluginOptions<Dto>) => AuthPluginFactory;\n\n/**\n * Creates a plugin factory for fetching and parsing service connect data.\n *\n * @param {ServiceConnectPluginFactoryOptions<Dto>} options - The options for the service connect plugin factory.\n * @returns {ServiceConnectPluginFactory} - A function that creates an auth plugin factory for fetching and parsing service connect data.\n */\nexport function serviceConnectPluginFactory<Dto = unknown>(options: ServiceConnectPluginFactoryOptions<Dto>): ServiceConnectPluginFactory<Dto> {\n return (pluginOptions) => () => {\n options.setup?.(pluginOptions);\n const { environment } = injectAuthConfig();\n const httpClient = inject(HttpClient);\n const url = buildServiceConnectUrl(pluginOptions?.environment ?? environment, ...options.endpoint);\n const parseResponse = (res: Dto | null) => ({\n ...(options.parseResponse(res) ?? options.defaultValue ?? {}),\n ...(pluginOptions?.additionalClaims?.(res as Dto & Record<string, unknown>) ?? {}),\n });\n\n return () => defer(() => httpClient.get<Dto>(url, { context: new HttpContext().set(requireAuthentication, true) })).pipe(map((res) => parseResponse(res)));\n };\n}\n","import { Directive, inject, Input } from '@angular/core';\nimport { AuthDirective } from '@odx/auth';\nimport { hasRolesOrRightsHandler, RolesOrRights } from './helpers';\n\n/**\n * A directive that extends the functionality of the `AuthDirective` to handle\n * roles or rights for service connection authorization.\n *\n * @see AuthDirective\n *\n * This directive should be used on an `ng-template` element with the selector\n * `odxAuthServiceConnectRights`.\n */\n@Directive({\n standalone: true,\n selector: 'ng-template[odxAuthServiceConnectRights]',\n hostDirectives: [\n {\n directive: AuthDirective,\n inputs: ['odxAuthElse:odxAuthServiceConnectRightsElse'],\n },\n ],\n})\nexport class ServiceConnectRightsDirective {\n private readonly authDirective = inject(AuthDirective, { host: true });\n\n /**\n * Sets the roles or rights that the user must have to display the content.\n */\n @Input('odxAuthServiceConnectRights')\n public set rolesOrRights(value: RolesOrRights | null | undefined) {\n this.authDirective.authorizationHandler = hasRolesOrRightsHandler(value ?? []);\n }\n}\n","import { CanActivateFn } from '@angular/router';\nimport { authGuard } from '@odx/auth';\nimport { hasRolesOrRightsHandler, RolesOrRights } from './helpers';\n\n/**\n * A guard function to check if the user has the required roles or rights to access a route.\n *\n * @param {RolesOrRights} rolesOrRights - The roles or rights required to access the route.\n * @param {string | any[]} redirectTo - (Optional) The route to redirect to if the user does not have the required roles or rights.\n * @param {boolean} isExternal - (Optional) A flag indicating if the redirection is to an external URL. Defaults to `false`.\n * @returns {CanActivateFn} - A function that checks the user's roles or rights and handles redirection if necessary.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function serviceConnectRightsGuard(rolesOrRights: RolesOrRights, redirectTo?: string | any[], isExternal = false): CanActivateFn {\n return authGuard(hasRolesOrRightsHandler(rolesOrRights), redirectTo, isExternal);\n}\n","import { GetServiceConnectRightsResponseDto } from './dtos';\nimport { Right, serviceConnectPluginFactory } from './helpers';\nimport { ServiceConnectEndpoints } from './service-connect.config';\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace OdxAuth {\n interface AuthPluginResult {\n rights: Right[];\n }\n }\n}\n\n/**\n * A plugin for fetching and parsing service connect rights.\n *\n * This plugin uses the `serviceConnectPluginFactory` to create a plugin that fetches user rights\n * from the specified endpoint and parses the response to extract the rights.\n *\n * @see {serviceConnectPluginFactory}\n */\nexport const serviceConnectRightsPlugin = serviceConnectPluginFactory<GetServiceConnectRightsResponseDto>({\n endpoint: [ServiceConnectEndpoints.userRights],\n parseResponse: (res) => ({ rights: res?.rights ?? [] }),\n defaultValue: { rights: [] },\n});\n","import { getLanguageCode } from '@odx/angular/utils';\nimport { GetServiceConnectUserResponseDto } from './dtos';\nimport { serviceConnectPluginFactory } from './helpers';\nimport { ServiceConnectEndpoints } from './service-connect.config';\n\n/**\n * Gets the preferred language from a service connect user response.\n *\n * @param {GetServiceConnectUserResponseDto | null} res - The service connect user response.\n * @returns {string | undefined} - The language or undefined.\n */\nexport function getServiceConnectUserLanguage(res?: GetServiceConnectUserResponseDto | null): string | undefined {\n return res?.preferred_language || res?.language_code;\n}\n\n/**\n * Gets the language code from a service connect user response.\n *\n * @param {GetServiceConnectUserResponseDto | null} res - The service connect user response.\n * @returns {string | undefined} - The language code or undefined.\n */\nexport function getServiceConnectUserLanguageCode(res?: GetServiceConnectUserResponseDto | null): string | undefined {\n return res?.language_code ? getLanguageCode(res.language_code) : undefined;\n}\n\n/**\n * A plugin for fetching and parsing the user's preferred language from service connect.\n *\n * This plugin uses the `serviceConnectPluginFactory` to create a plugin that fetches the user's preferred language\n * from the user endpoint and parses the response to extract the preferred language.\n *\n * @see {serviceConnectPluginFactory}\n */\nexport const serviceConnectUserLanguagePlugin = serviceConnectPluginFactory<GetServiceConnectUserResponseDto>({\n endpoint: [ServiceConnectEndpoints.user],\n parseResponse: (res) => ({ preferredLanguage: getServiceConnectUserLanguage(res), languageCode: getServiceConnectUserLanguageCode(res) }),\n});\n","import { GetServiceConnectUserResponseDto } from './dtos';\nimport { serviceConnectPluginFactory } from './helpers';\nimport { getServiceConnectUserLanguage, getServiceConnectUserLanguageCode } from './service-connect-user-language.plugin';\nimport { ServiceConnectEndpoints } from './service-connect.config';\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace OdxAuth {\n interface AuthPluginResult {\n country?: string;\n institutionId?: number;\n institutionName?: string;\n institutionName2?: string;\n institutionName3?: string;\n institutionShortname?: string;\n accountNumber?: string;\n }\n }\n}\n\n/**\n * A plugin for fetching and parsing the user's profile from service connect.\n *\n * This plugin uses the `serviceConnectPluginFactory` to create a plugin that fetches the user's profile\n * from the user endpoint and parses the response to extract the user's profile information.\n *\n * @see {serviceConnectPluginFactory}\n */\nexport const serviceConnectUserProfilePlugin = serviceConnectPluginFactory<GetServiceConnectUserResponseDto>({\n endpoint: [ServiceConnectEndpoints.user],\n parseResponse: (res) => {\n return {\n country: res?.country,\n institutionId: res?.institution_id,\n institutionName: res?.institution_name,\n institutionName2: res?.institution_name_2 ?? undefined,\n institutionName3: res?.institution_name_3 ?? undefined,\n accountNumber: res?.account_number ?? undefined,\n institutionShortname: res?.institution_shortname,\n languageCode: getServiceConnectUserLanguageCode(res),\n preferredLanguage: getServiceCon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auth-plugins-service-connect.mjs","sources":["../../../../libs/auth/plugins/service-connect/src/lib/service-connect.config.ts","../../../../libs/auth/plugins/service-connect/src/lib/helpers/build-service-connect-url.ts","../../../../libs/auth/plugins/service-connect/src/lib/helpers/has-roles-or-rights.ts","../../../../libs/auth/plugins/service-connect/src/lib/helpers/has-roles-or-rights-handler.ts","../../../../libs/auth/plugins/service-connect/src/lib/helpers/service-connect-plugin-factory.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-rights.directive.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-rights.guard.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-rights.plugin.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-user-language.plugin.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-user-profile.plugin.ts","../../../../libs/auth/plugins/service-connect/src/odx-auth-plugins-service-connect.ts"],"sourcesContent":["import { AuthEnvironment } from '@odx/auth';\n\nexport type ServiceConnectEnvironment = { custom: string };\nexport const ServiceConnectEnvironments: Record<AuthEnvironment, string> = {\n [AuthEnvironment.DEV]: 'https://api.test.connect.draeger.com',\n [AuthEnvironment.STAGE]: 'https://api.staging.connect.draeger.com',\n [AuthEnvironment.PROD]: 'https://api.connect.draeger.com',\n};\nexport const ServiceConnectScopes = {\n BASE: 'dcid',\n PROFILE: 'dcid.profile',\n RIGHTS: 'dcid.rights',\n INSTITUTION: 'dcid.institution',\n};\nexport const ServiceConnectEndpoints = {\n user: '/users/me',\n userRights: '/users/me/rights',\n};\n","import { buildUrl, isString } from '@odx/angular/utils';\nimport { AuthEnvironment } from '@odx/auth';\nimport { ServiceConnectEnvironment, ServiceConnectEnvironments } from '../service-connect.config';\n\n/**\n * Builds a service connect URL based on the provided environment and endpoints.\n *\n * @param {ServiceConnectEnvironment | AuthEnvironment} environment - The environment configuration which can be either a `ServiceConnectEnvironment` or `AuthEnvironment`.\n * @param {string[]} endpoints - A list of endpoint strings to be appended to the base URL.\n * @returns {string} - The constructed service connect URL as a string.\n */\nexport function buildServiceConnectUrl(environment: ServiceConnectEnvironment | AuthEnvironment, ...endpoints: string[]): string {\n if (isString(environment)) {\n return buildUrl(ServiceConnectEnvironments[environment], ...endpoints);\n }\n return buildUrl(environment.custom, ...endpoints);\n}\n","export type Right = string | number;\nexport type Role = Right[];\nexport type RolesOrRights = Array<Role | Right>;\n\n/**\n * Checks if the user has any of the specified roles or rights.\n *\n * @param {Right[]} userRights - An array of rights that the user possesses.\n * @param {RolesOrRights} rolesOrRights - An array of roles or rights to check against. A role is represented as an array of rights.\n * @returns {boolean} - `true` if the user has any of the specified roles or rights, otherwise `false`.\n */\nexport function hasRolesOrRights(userRights: Right[], rolesOrRights: RolesOrRights): boolean {\n return rolesOrRights.some((rights) => (Array.isArray(rights) ? rights : [rights])?.every((right) => userRights.includes(right)));\n}\n","import { AuthorizedHandler } from '@odx/auth';\nimport { hasRolesOrRights, RolesOrRights } from './has-roles-or-rights';\n\n/**\n * Creates an authorized handler that checks if the user has the specified roles or rights.\n *\n * @param {RolesOrRights} rolesOrRights - The roles or rights to check against the user's claims.\n * @returns {AuthorizedHandler} - An handler function that takes user claims and returns a boolean indicating\n * whether the user has the required roles or rights.\n */\nexport function hasRolesOrRightsHandler(rolesOrRights: RolesOrRights): AuthorizedHandler {\n return (claims) => hasRolesOrRights(claims?.rights ?? [], rolesOrRights);\n}\n","import { HttpClient, HttpContext } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { AuthPluginFactory, injectAuthConfig, requireAuthentication } from '@odx/auth';\nimport { defer, map } from 'rxjs';\nimport { ServiceConnectEnvironment } from '../service-connect.config';\nimport { buildServiceConnectUrl } from './build-service-connect-url';\n\nexport interface ServiceConnectPluginOptions<Dto = unknown> {\n environment?: ServiceConnectEnvironment;\n additionalClaims?: (dto: (Dto & Record<string, unknown>) | null) => Partial<OdxAuth.AuthPluginResult>;\n}\n\nexport interface ServiceConnectPluginFactoryOptions<Dto> {\n endpoint: string[];\n parseResponse: (res: Dto | null) => Partial<OdxAuth.AuthPluginResult>;\n defaultValue?: Partial<OdxAuth.AuthPluginResult>;\n setup?: (pluginOptions?: ServiceConnectPluginOptions<Dto>) => void;\n}\n\nexport type ServiceConnectPluginFactory<Dto = unknown> = (pluginOptions?: ServiceConnectPluginOptions<Dto>) => AuthPluginFactory;\n\n/**\n * Creates a plugin factory for fetching and parsing service connect data.\n *\n * @param {ServiceConnectPluginFactoryOptions<Dto>} options - The options for the service connect plugin factory.\n * @returns {ServiceConnectPluginFactory} - A function that creates an auth plugin factory for fetching and parsing service connect data.\n */\nexport function serviceConnectPluginFactory<Dto = unknown>(options: ServiceConnectPluginFactoryOptions<Dto>): ServiceConnectPluginFactory<Dto> {\n return (pluginOptions) => () => {\n options.setup?.(pluginOptions);\n const { environment } = injectAuthConfig();\n const httpClient = inject(HttpClient);\n const url = buildServiceConnectUrl(pluginOptions?.environment ?? environment, ...options.endpoint);\n const parseResponse = (res: Dto | null) => ({\n ...(options.parseResponse(res) ?? options.defaultValue ?? {}),\n ...(pluginOptions?.additionalClaims?.(res as Dto & Record<string, unknown>) ?? {}),\n });\n\n return () => defer(() => httpClient.get<Dto>(url, { context: new HttpContext().set(requireAuthentication, true) })).pipe(map((res) => parseResponse(res)));\n };\n}\n","import { Directive, inject, Input } from '@angular/core';\nimport { AuthDirective } from '@odx/auth';\nimport { hasRolesOrRightsHandler, RolesOrRights } from './helpers';\n\n/**\n * A directive that extends the functionality of the `AuthDirective` to handle\n * roles or rights for service connection authorization.\n *\n * @see AuthDirective\n *\n * This directive should be used on an `ng-template` element with the selector\n * `odxAuthServiceConnectRights`.\n */\n@Directive({\n standalone: true,\n selector: 'ng-template[odxAuthServiceConnectRights]',\n hostDirectives: [\n {\n directive: AuthDirective,\n inputs: ['odxAuthElse:odxAuthServiceConnectRightsElse'],\n },\n ],\n})\nexport class ServiceConnectRightsDirective {\n private readonly authDirective = inject(AuthDirective, { host: true });\n\n /**\n * Sets the roles or rights that the user must have to display the content.\n */\n @Input('odxAuthServiceConnectRights')\n public set rolesOrRights(value: RolesOrRights | null | undefined) {\n this.authDirective.authorizationHandler = hasRolesOrRightsHandler(value ?? []);\n }\n}\n","import { CanActivateFn } from '@angular/router';\nimport { authGuard } from '@odx/auth';\nimport { hasRolesOrRightsHandler, RolesOrRights } from './helpers';\n\n/**\n * A guard function to check if the user has the required roles or rights to access a route.\n *\n * @param {RolesOrRights} rolesOrRights - The roles or rights required to access the route.\n * @param {string | any[]} redirectTo - (Optional) The route to redirect to if the user does not have the required roles or rights.\n * @param {boolean} isExternal - (Optional) A flag indicating if the redirection is to an external URL. Defaults to `false`.\n * @returns {CanActivateFn} - A function that checks the user's roles or rights and handles redirection if necessary.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function serviceConnectRightsGuard(rolesOrRights: RolesOrRights, redirectTo?: string | any[], isExternal = false): CanActivateFn {\n return authGuard(hasRolesOrRightsHandler(rolesOrRights), redirectTo, isExternal);\n}\n","import { GetServiceConnectRightsResponseDto } from './dtos';\nimport { Right, serviceConnectPluginFactory } from './helpers';\nimport { ServiceConnectEndpoints } from './service-connect.config';\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace OdxAuth {\n interface AuthPluginResult {\n rights: Right[];\n }\n }\n}\n\n/**\n * A plugin for fetching and parsing service connect rights.\n *\n * This plugin uses the `serviceConnectPluginFactory` to create a plugin that fetches user rights\n * from the specified endpoint and parses the response to extract the rights.\n *\n * @see {serviceConnectPluginFactory}\n */\nexport const serviceConnectRightsPlugin = serviceConnectPluginFactory<GetServiceConnectRightsResponseDto>({\n endpoint: [ServiceConnectEndpoints.userRights],\n parseResponse: (res) => ({ rights: res?.rights ?? [] }),\n defaultValue: { rights: [] },\n});\n","import { getLanguageCode } from '@odx/angular/utils';\nimport { GetServiceConnectUserResponseDto } from './dtos';\nimport { serviceConnectPluginFactory } from './helpers';\nimport { ServiceConnectEndpoints } from './service-connect.config';\n\n/**\n * Gets the preferred language from a service connect user response.\n *\n * @param {GetServiceConnectUserResponseDto | null} res - The service connect user response.\n * @returns {string | undefined} - The language or undefined.\n */\nexport function getServiceConnectUserLanguage(res?: GetServiceConnectUserResponseDto | null): string | undefined {\n return res?.preferred_language || res?.language_code;\n}\n\n/**\n * Gets the language code from a service connect user response.\n *\n * @param {GetServiceConnectUserResponseDto | null} res - The service connect user response.\n * @returns {string | undefined} - The language code or undefined.\n */\nexport function getServiceConnectUserLanguageCode(res?: GetServiceConnectUserResponseDto | null): string | undefined {\n return res?.language_code ? getLanguageCode(res.language_code) : undefined;\n}\n\n/**\n * A plugin for fetching and parsing the user's preferred language from service connect.\n *\n * This plugin uses the `serviceConnectPluginFactory` to create a plugin that fetches the user's preferred language\n * from the user endpoint and parses the response to extract the preferred language.\n *\n * @see {serviceConnectPluginFactory}\n */\nexport const serviceConnectUserLanguagePlugin = serviceConnectPluginFactory<GetServiceConnectUserResponseDto>({\n endpoint: [ServiceConnectEndpoints.user],\n parseResponse: (res) => ({ preferredLanguage: getServiceConnectUserLanguage(res), languageCode: getServiceConnectUserLanguageCode(res) }),\n});\n","import { GetServiceConnectUserResponseDto } from './dtos';\nimport { serviceConnectPluginFactory } from './helpers';\nimport { getServiceConnectUserLanguage, getServiceConnectUserLanguageCode } from './service-connect-user-language.plugin';\nimport { ServiceConnectEndpoints } from './service-connect.config';\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace OdxAuth {\n interface AuthPluginResult {\n country?: string;\n institutionId?: number;\n institutionName?: string;\n institutionName2?: string;\n institutionName3?: string;\n institutionShortname?: string;\n accountNumber?: string;\n }\n }\n}\n\n/**\n * A plugin for fetching and parsing the user's profile from service connect.\n *\n * This plugin uses the `serviceConnectPluginFactory` to create a plugin that fetches the user's profile\n * from the user endpoint and parses the response to extract the user's profile information.\n *\n * @see {serviceConnectPluginFactory}\n */\nexport const serviceConnectUserProfilePlugin = serviceConnectPluginFactory<GetServiceConnectUserResponseDto>({\n endpoint: [ServiceConnectEndpoints.user],\n parseResponse: (res) => {\n return {\n country: res?.country,\n institutionId: res?.institution_id,\n institutionName: res?.institution_name,\n institutionName2: res?.institution_name_2 ?? undefined,\n institutionName3: res?.institution_name_3 ?? undefined,\n accountNumber: res?.account_number ?? undefined,\n institutionShortname: res?.institution_shortname,\n languageCode: getServiceConnectUserLanguageCode(res),\n preferredLanguage: getServiceConnectUserLanguage(res),\n };\n },\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAGO,MAAM,0BAA0B,GAAoC;AACzE,IAAA,CAAC,eAAe,CAAC,GAAG,GAAG,sCAAsC;AAC7D,IAAA,CAAC,eAAe,CAAC,KAAK,GAAG,yCAAyC;AAClE,IAAA,CAAC,eAAe,CAAC,IAAI,GAAG,iCAAiC;;AAEpD,MAAM,oBAAoB,GAAG;AAClC,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,OAAO,EAAE,cAAc;AACvB,IAAA,MAAM,EAAE,aAAa;AACrB,IAAA,WAAW,EAAE,kBAAkB;;AAE1B,MAAM,uBAAuB,GAAG;AACrC,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,UAAU,EAAE,kBAAkB;;;ACZhC;;;;;;AAMG;SACa,sBAAsB,CAAC,WAAwD,EAAE,GAAG,SAAmB,EAAA;AACrH,IAAA,IAAI,QAAQ,CAAC,WAAW,CAAC,EAAE;QACzB,OAAO,QAAQ,CAAC,0BAA0B,CAAC,WAAW,CAAC,EAAE,GAAG,SAAS,CAAC;IACxE;IACA,OAAO,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC;AACnD;;ACZA;;;;;;AAMG;AACG,SAAU,gBAAgB,CAAC,UAAmB,EAAE,aAA4B,EAAA;AAChF,IAAA,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC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AE,GAAG,EAAE,qBAAqB;AAChD,YAAA,YAAY,EAAE,iCAAiC,CAAC,GAAG,CAAC;AACpD,YAAA,iBAAiB,EAAE,6BAA6B,CAAC,GAAG,CAAC;SACtD;IACH,CAAC;AACF,CAAA;;AC3CD;;AAEG;;;;"}
|
package/fesm2022/odx-auth.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as i1$
|
|
1
|
+
import * as i1$2 from '@angular/common';
|
|
2
2
|
import { CommonModule, AsyncPipe, NgIf } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { inject, EnvironmentInjector, runInInjectionContext, Directive, EventEmitter, HostListener, Output, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, DestroyRef, InjectionToken, ENVIRONMENT_INITIALIZER, makeEnvironmentProviders, APP_INITIALIZER, Injectable, input, NgModule } from '@angular/core';
|
|
@@ -12,7 +12,7 @@ import { LoadingSpinnerDirective, LoadingSpinnerModule } from '@odx/angular/comp
|
|
|
12
12
|
import { TranslatePipe, provideTranslations } from '@odx/angular/internal/translate';
|
|
13
13
|
import { buildUrl, isString, matchUrl, untilDestroyed, injectElement, isNumber, isNonEmptyString, createConfigTokens, Position } from '@odx/angular/utils';
|
|
14
14
|
import { filter, switchMap, mergeMap, map, of, tap, BehaviorSubject, distinctUntilChanged, share, combineLatest, take, timeout, catchError, fromEvent, startWith, shareReplay, merge, EMPTY } from 'rxjs';
|
|
15
|
-
import { OAuthErrorEvent,
|
|
15
|
+
import { OAuthErrorEvent, provideOAuthClient, OAuthStorage, OAuthService } from 'angular-oauth2-oidc';
|
|
16
16
|
import { HttpRequest, HttpContextToken, provideHttpClient, withInterceptors, HttpErrorResponse } from '@angular/common/http';
|
|
17
17
|
import { Router } from '@angular/router';
|
|
18
18
|
import { Environment, CoreModule, WindowRef } from '@odx/angular';
|
|
@@ -20,16 +20,16 @@ import { deepmerge } from 'deepmerge-ts';
|
|
|
20
20
|
import { DynamicViewDirective, DynamicViewService } from '@odx/angular/cdk/dynamic-view';
|
|
21
21
|
import { Logger, CSSComponent } from '@odx/angular/internal';
|
|
22
22
|
import { __decorate } from 'tslib';
|
|
23
|
-
import * as
|
|
23
|
+
import * as i1$1 from '@odx/angular/components/list';
|
|
24
24
|
import { ListModule } from '@odx/angular/components/list';
|
|
25
|
-
import * as
|
|
25
|
+
import * as i2 from '@odx/angular/components/icon';
|
|
26
26
|
import { IconComponent } from '@odx/angular/components/icon';
|
|
27
27
|
import { trigger, transition, useAnimation } from '@angular/animations';
|
|
28
28
|
import { fadeOut } from '@odx/angular/animations';
|
|
29
29
|
import { CircularProgressComponent } from '@odx/angular/components/circular-progress';
|
|
30
30
|
import { LogoDirective } from '@odx/angular/components/logo';
|
|
31
31
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
32
|
-
import * as i3
|
|
32
|
+
import * as i3 from '@odx/angular/components/avatar';
|
|
33
33
|
import * as i4 from '@odx/angular/components/action-group';
|
|
34
34
|
import * as i5 from '@odx/angular/components/button';
|
|
35
35
|
|
|
@@ -251,10 +251,10 @@ class AuthActionDirective {
|
|
|
251
251
|
this.loadingSpinnerDirective.isLoading = isRedirecting;
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
255
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
254
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
255
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: AuthActionDirective, isStandalone: true, ngImport: i0 }); }
|
|
256
256
|
}
|
|
257
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthActionDirective, decorators: [{
|
|
258
258
|
type: Directive
|
|
259
259
|
}] });
|
|
260
260
|
|
|
@@ -287,10 +287,10 @@ class SignInDirective extends AuthActionDirective {
|
|
|
287
287
|
this.authService.signIn();
|
|
288
288
|
this.afterSignIn.next();
|
|
289
289
|
}
|
|
290
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
291
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
290
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SignInDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
291
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: SignInDirective, isStandalone: true, selector: "[odxButton][odxAuthSignIn]", outputs: { afterSignIn: "odxAuthSignIn" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1.LoadingSpinnerDirective }], ngImport: i0 }); }
|
|
292
292
|
}
|
|
293
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SignInDirective, decorators: [{
|
|
294
294
|
type: Directive,
|
|
295
295
|
args: [{
|
|
296
296
|
standalone: true,
|
|
@@ -332,10 +332,10 @@ class SignOutDirective extends AuthActionDirective {
|
|
|
332
332
|
this.authService.signOut();
|
|
333
333
|
this.afterSignOut.next();
|
|
334
334
|
}
|
|
335
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
336
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
335
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SignOutDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
336
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: SignOutDirective, isStandalone: true, selector: "[odxAuthSignOut]", outputs: { afterSignOut: "odxAuthSignOut" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1.LoadingSpinnerDirective }], ngImport: i0 }); }
|
|
337
337
|
}
|
|
338
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SignOutDirective, decorators: [{
|
|
339
339
|
type: Directive,
|
|
340
340
|
args: [{
|
|
341
341
|
standalone: true,
|
|
@@ -364,15 +364,15 @@ let AuthActionsComponent = class AuthActionsComponent {
|
|
|
364
364
|
*/
|
|
365
365
|
this.claims = null;
|
|
366
366
|
}
|
|
367
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
368
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
367
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
368
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AuthActionsComponent, isStandalone: true, selector: "odx-auth-actions", inputs: { claims: "claims" }, ngImport: i0, template: "<odx-list>\n @if (claims?.userProfileUrl; as url) {\n <a odxListItem data-testid=\"odx-auth-user-profile-link\" [href]=\"url\" rel=\"noopener\" target=\"_blank\">\n <odx-icon name=\"core::user-administration\" odxListItemPrefix />\n {{ 'userProfileLink' | odxTranslate | async }}\n </a>\n }\n <button odxListItem odxAuthSignOut data-testid=\"odx-auth-sign-out-button\" style=\"width: 100%\">\n <odx-icon name=\"core::logout\" odxListItemPrefix />\n {{ 'signOutButtonText' | odxTranslate | async }}\n </button>\n</odx-list>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "ngmodule", type: ListModule }, { kind: "component", type: i1$1.ListComponent, selector: "odx-list" }, { kind: "component", type: i1$1.ListItemComponent, selector: "odx-list-item, [odxListItem]", inputs: ["variant", "muted", "selected"] }, { kind: "component", type: i2.IconComponent, selector: "odx-icon", inputs: ["size", "name", "set", "identifier"] }, { kind: "directive", type: SignOutDirective, selector: "[odxAuthSignOut]", outputs: ["odxAuthSignOut"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "odxTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
369
369
|
};
|
|
370
370
|
AuthActionsComponent = __decorate([
|
|
371
371
|
CSSComponent('auth-actions')
|
|
372
372
|
], AuthActionsComponent);
|
|
373
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthActionsComponent, decorators: [{
|
|
374
374
|
type: Component,
|
|
375
|
-
args: [{ standalone: true, selector: 'odx-auth-actions', imports: [CoreModule, ListModule, TranslatePipe, SignOutDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<odx-list>\n @if (claims?.userProfileUrl; as url) {\n <a odxListItem data-testid=\"odx-auth-user-profile-link\" [href]=\"url\" rel=\"noopener\" target=\"_blank\">\n <odx-icon name=\"user-administration\"
|
|
375
|
+
args: [{ standalone: true, selector: 'odx-auth-actions', imports: [CoreModule, ListModule, TranslatePipe, SignOutDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<odx-list>\n @if (claims?.userProfileUrl; as url) {\n <a odxListItem data-testid=\"odx-auth-user-profile-link\" [href]=\"url\" rel=\"noopener\" target=\"_blank\">\n <odx-icon name=\"core::user-administration\" odxListItemPrefix />\n {{ 'userProfileLink' | odxTranslate | async }}\n </a>\n }\n <button odxListItem odxAuthSignOut data-testid=\"odx-auth-sign-out-button\" style=\"width: 100%\">\n <odx-icon name=\"core::logout\" odxListItemPrefix />\n {{ 'signOutButtonText' | odxTranslate | async }}\n </button>\n</odx-list>\n" }]
|
|
376
376
|
}], propDecorators: { claims: [{
|
|
377
377
|
type: Input
|
|
378
378
|
}] } });
|
|
@@ -386,7 +386,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
386
386
|
class AuthLoadingScreenComponent {
|
|
387
387
|
constructor() {
|
|
388
388
|
this.authConfig = injectAuthConfig();
|
|
389
|
-
this.icon$ = inject(AuthService).isRedirecting$.pipe(map((isRedirecting) => (isRedirecting ? 'link-external' : 'user')));
|
|
389
|
+
this.icon$ = inject(AuthService).isRedirecting$.pipe(map((isRedirecting) => (isRedirecting ? 'core::link-external' : 'core::user')));
|
|
390
390
|
}
|
|
391
391
|
static { this.instance = null; }
|
|
392
392
|
/**
|
|
@@ -407,14 +407,14 @@ class AuthLoadingScreenComponent {
|
|
|
407
407
|
}
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
411
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
410
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthLoadingScreenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
411
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AuthLoadingScreenComponent, isStandalone: true, selector: "div.odx-auth-loading-screen", host: { properties: { "@hostAnimation": "true" } }, ngImport: i0, template: "<div class=\"odx-auth-loading-screen__content\" odxLayout=\"grid 12 horizontal-center vertical-center gap-small\">\n <odx-logo size=\"large\" />\n <odx-circular-progress class=\"odx-auth-loading-screen__spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" />\n </odx-circular-progress>\n @if (authConfig.loadingScreenMessage; as content) {\n <p class=\"odx-auth-loading-screen__message\">\n <ng-template [odxDynamicView]=\"content\" />\n </p>\n }\n</div>\n", styles: ["@keyframes odx-auth-loading-screen-animation{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%)}}.odx-auth-loading-screen{--odx-c-highlight: var(--odx-c-primary);background-color:var(--odx-c-background-content);inset:0;position:fixed;z-index:var(--odx-z-level-topmost)}.odx-auth-loading-screen__content{animation:odx-auth-loading-screen-animation .75s ease;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.odx-auth-loading-screen__message{text-align:center}.odx-auth-loading-screen__spinner{position:relative}.odx-auth-loading-screen__spinner .odx-icon{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["size", "name", "set", "identifier"] }, { kind: "directive", type: LogoDirective, selector: "odx-logo", inputs: ["size", "variant"] }, { kind: "component", type: CircularProgressComponent, selector: "odx-circular-progress", inputs: ["stroke", "size", "value"] }, { kind: "directive", type: DynamicViewDirective, selector: "ng-template[odxDynamicView]", inputs: ["odxDynamicView", "odxDynamicViewInjector", "odxDynamicViewContext"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], animations: [trigger('hostAnimation', [transition(':leave', useAnimation(fadeOut()))])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
412
412
|
}
|
|
413
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthLoadingScreenComponent, decorators: [{
|
|
414
414
|
type: Component,
|
|
415
415
|
args: [{ standalone: true, selector: 'div.odx-auth-loading-screen', imports: [CommonModule, IconComponent, LogoDirective, CircularProgressComponent, DynamicViewDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
416
416
|
'[@hostAnimation]': 'true',
|
|
417
|
-
}, animations: [trigger('hostAnimation', [transition(':leave', useAnimation(fadeOut()))])], template: "<div class=\"odx-auth-loading-screen__content\" odxLayout=\"grid 12 horizontal-center vertical-center gap-small\">\n <odx-logo size=\"large\" />\n <odx-circular-progress class=\"odx-auth-loading-screen__spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\"
|
|
417
|
+
}, animations: [trigger('hostAnimation', [transition(':leave', useAnimation(fadeOut()))])], template: "<div class=\"odx-auth-loading-screen__content\" odxLayout=\"grid 12 horizontal-center vertical-center gap-small\">\n <odx-logo size=\"large\" />\n <odx-circular-progress class=\"odx-auth-loading-screen__spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" />\n </odx-circular-progress>\n @if (authConfig.loadingScreenMessage; as content) {\n <p class=\"odx-auth-loading-screen__message\">\n <ng-template [odxDynamicView]=\"content\" />\n </p>\n }\n</div>\n", styles: ["@keyframes odx-auth-loading-screen-animation{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%)}}.odx-auth-loading-screen{--odx-c-highlight: var(--odx-c-primary);background-color:var(--odx-c-background-content);inset:0;position:fixed;z-index:var(--odx-z-level-topmost)}.odx-auth-loading-screen__content{animation:odx-auth-loading-screen-animation .75s ease;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.odx-auth-loading-screen__message{text-align:center}.odx-auth-loading-screen__spinner{position:relative}.odx-auth-loading-screen__spinner .odx-icon{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}\n"] }]
|
|
418
418
|
}] });
|
|
419
419
|
|
|
420
420
|
/**
|
|
@@ -631,10 +631,10 @@ class AuthPluginManager {
|
|
|
631
631
|
runPlugin(authService, plugin) {
|
|
632
632
|
return plugin(authService).pipe(isNumber(this.authConfig.pluginTimeout) ? timeout(Math.max(0, this.authConfig.pluginTimeout)) : tap(), catchError((error) => this.handlePluginError(error)));
|
|
633
633
|
}
|
|
634
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
635
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
634
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthPluginManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
635
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthPluginManager, providedIn: 'root' }); }
|
|
636
636
|
}
|
|
637
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
637
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthPluginManager, decorators: [{
|
|
638
638
|
type: Injectable,
|
|
639
639
|
args: [{ providedIn: 'root' }]
|
|
640
640
|
}] });
|
|
@@ -944,10 +944,10 @@ class AuthService {
|
|
|
944
944
|
this.oauthService.stopAutomaticRefresh();
|
|
945
945
|
}
|
|
946
946
|
}
|
|
947
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
948
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
947
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
948
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthService, providedIn: 'root' }); }
|
|
949
949
|
}
|
|
950
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
950
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthService, decorators: [{
|
|
951
951
|
type: Injectable,
|
|
952
952
|
args: [{ providedIn: 'root' }]
|
|
953
953
|
}], ctorParameters: () => [] });
|
|
@@ -1065,15 +1065,15 @@ class AuthComponent {
|
|
|
1065
1065
|
*
|
|
1066
1066
|
* @type {InputSignal<boolean>}
|
|
1067
1067
|
*/
|
|
1068
|
-
this.hideInstitution = input(false);
|
|
1068
|
+
this.hideInstitution = input(false, ...(ngDevMode ? [{ debugName: "hideInstitution" }] : []));
|
|
1069
1069
|
}
|
|
1070
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1071
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1070
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1071
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AuthComponent, isStandalone: true, selector: "odx-auth", inputs: { hideInstitution: { classPropertyName: "hideInstitution", publicName: "hideInstitution", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideTranslations(translations)], ngImport: i0, template: "<odx-action-group>\n @if (vm$ | async; as vm) {\n <ng-container ngProjectAs=\"[odxButton]\">\n @if (vm.isAuthenticated) {\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" />\n </button>\n } @else {\n <button class=\"odx-auth-sign-in\" odxButton odxAuthSignIn variant=\"secondary\" data-testid=\"odx-auth-sign-in-button\">\n <odx-icon name=\"core::user\" alignLeft />\n {{ 'signInButtonText' | odxTranslate | async }}\n </button>\n }\n <ng-template #userProfileMenu>\n @if (!hideInstitution() && vm.idClaims?.institutionName; as institutionName) {\n <p class=\"odx-padding-x-8\" data-testid=\"odx-auth-institution-name\">{{ institutionName }}</p>\n }\n <odx-area-header class=\"odx-padding-x-8 odx-margin-y-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\" />\n {{ vm.idClaims?.username }}\n <odx-area-header-subtitle>\n {{ vm.idClaims?.email }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <ng-content />\n <odx-auth-actions [claims]=\"vm.idClaims\" />\n </ng-template>\n <ng-template #userAvatar>\n <odx-avatar class=\"odx-auth-user-avatar\">\n {{ vm.idClaims?.initials ?? '' }}\n </odx-avatar>\n </ng-template>\n </ng-container>\n }\n</odx-action-group>\n", styles: [".odx-auth-user-profile .odx-dropdown__inner{border-block-width:var(--odx-control-border-width);max-width:max(400px,25vw);min-width:320px}\n"], dependencies: [{ kind: "ngmodule", type: AreaHeaderModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$1.AreaHeaderComponent, selector: "odx-area-header", inputs: ["size"] }, { kind: "directive", type: i2$1.AreaHeaderSubtitleDirective, selector: "odx-area-header-subtitle" }, { kind: "component", type: i3.AvatarComponent, selector: "odx-avatar", inputs: ["size", "variant"] }, { kind: "component", type: i4.ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }, { kind: "component", type: i5.ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: i2.IconComponent, selector: "odx-icon", inputs: ["size", "name", "set", "identifier"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "directive", type: i7.DropdownDirective, selector: "[odxDropdown]", inputs: ["odxDropdown", "odxDropdownDisabled", "odxDropdownShowLoader", "odxDropdownClickOutsideActive", "odxDropdownOptions", "odxDropdownReferenceElement", "odxDropdownTriggerElement", "odxDropdownHost", "odxDropdownOpenTrigger", "odxDropdownCloseTrigger"], outputs: ["odxDropdownBeforeOpen", "odxDropdownAfterOpen", "odxDropdownBeforeClose", "odxDropdownAfterClose"], exportAs: ["odxDropdown"] }, { kind: "ngmodule", type: HeaderModule }, { kind: "directive", type: SignInDirective, selector: "[odxButton][odxAuthSignIn]", outputs: ["odxAuthSignIn"] }, { kind: "ngmodule", type: LoadingSpinnerModule }, { kind: "component", type: AuthActionsComponent, selector: "odx-auth-actions", inputs: ["claims"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "odxTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1072
1072
|
}
|
|
1073
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1073
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthComponent, decorators: [{
|
|
1074
1074
|
type: Component,
|
|
1075
|
-
args: [{ standalone: true, selector: 'odx-auth', imports: [AreaHeaderModule, DropdownModule, HeaderModule, SignInDirective, LoadingSpinnerModule, AuthActionsComponent, TranslatePipe, AsyncPipe], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [provideTranslations(translations)], template: "<odx-action-group>\n @if (vm$ | async; as vm) {\n <ng-container ngProjectAs=\"[odxButton]\">\n @if (vm.isAuthenticated) {\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" />\n </button>\n } @else {\n <button class=\"odx-auth-sign-in\" odxButton odxAuthSignIn variant=\"secondary\" data-testid=\"odx-auth-sign-in-button\">\n <odx-icon name=\"user\" alignLeft />\n {{ 'signInButtonText' | odxTranslate | async }}\n </button>\n }\n <ng-template #userProfileMenu>\n @if (!hideInstitution() && vm.idClaims?.institutionName; as institutionName) {\n <p class=\"odx-padding-x-8\" data-testid=\"odx-auth-institution-name\">{{ institutionName }}</p>\n }\n <odx-area-header class=\"odx-padding-x-8 odx-margin-y-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\" />\n {{ vm.idClaims?.username }}\n <odx-area-header-subtitle>\n {{ vm.idClaims?.email }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <ng-content />\n <odx-auth-actions [claims]=\"vm.idClaims\" />\n </ng-template>\n <ng-template #userAvatar>\n <odx-avatar class=\"odx-auth-user-avatar\">\n {{ vm.idClaims?.initials ?? '' }}\n </odx-avatar>\n </ng-template>\n </ng-container>\n }\n</odx-action-group>\n", styles: [".odx-auth-user-profile .odx-dropdown__inner{border-block-width:var(--odx-control-border-width);max-width:max(400px,25vw);min-width:320px}\n"] }]
|
|
1076
|
-
}] });
|
|
1075
|
+
args: [{ standalone: true, selector: 'odx-auth', imports: [AreaHeaderModule, DropdownModule, HeaderModule, SignInDirective, LoadingSpinnerModule, AuthActionsComponent, TranslatePipe, AsyncPipe], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [provideTranslations(translations)], template: "<odx-action-group>\n @if (vm$ | async; as vm) {\n <ng-container ngProjectAs=\"[odxButton]\">\n @if (vm.isAuthenticated) {\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" />\n </button>\n } @else {\n <button class=\"odx-auth-sign-in\" odxButton odxAuthSignIn variant=\"secondary\" data-testid=\"odx-auth-sign-in-button\">\n <odx-icon name=\"core::user\" alignLeft />\n {{ 'signInButtonText' | odxTranslate | async }}\n </button>\n }\n <ng-template #userProfileMenu>\n @if (!hideInstitution() && vm.idClaims?.institutionName; as institutionName) {\n <p class=\"odx-padding-x-8\" data-testid=\"odx-auth-institution-name\">{{ institutionName }}</p>\n }\n <odx-area-header class=\"odx-padding-x-8 odx-margin-y-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\" />\n {{ vm.idClaims?.username }}\n <odx-area-header-subtitle>\n {{ vm.idClaims?.email }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <ng-content />\n <odx-auth-actions [claims]=\"vm.idClaims\" />\n </ng-template>\n <ng-template #userAvatar>\n <odx-avatar class=\"odx-auth-user-avatar\">\n {{ vm.idClaims?.initials ?? '' }}\n </odx-avatar>\n </ng-template>\n </ng-container>\n }\n</odx-action-group>\n", styles: [".odx-auth-user-profile .odx-dropdown__inner{border-block-width:var(--odx-control-border-width);max-width:max(400px,25vw);min-width:320px}\n"] }]
|
|
1076
|
+
}], propDecorators: { hideInstitution: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideInstitution", required: false }] }] } });
|
|
1077
1077
|
|
|
1078
1078
|
class AuthDirective {
|
|
1079
1079
|
constructor() {
|
|
@@ -1102,10 +1102,10 @@ class AuthDirective {
|
|
|
1102
1102
|
this.ngIfDirective.ngIf = this.authService.isAuthorized(handler);
|
|
1103
1103
|
});
|
|
1104
1104
|
}
|
|
1105
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1106
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1105
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1106
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: AuthDirective, isStandalone: true, selector: "ng-template[odxAuth]", inputs: { authorizationHandler: ["odxAuth", "authorizationHandler"], elseTemplate: ["odxAuthElse", "elseTemplate"] }, hostDirectives: [{ directive: i1$2.NgIf }], ngImport: i0 }); }
|
|
1107
1107
|
}
|
|
1108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthDirective, decorators: [{
|
|
1109
1109
|
type: Directive,
|
|
1110
1110
|
args: [{
|
|
1111
1111
|
standalone: true,
|
|
@@ -1160,11 +1160,11 @@ function authGuard(authorizedHandler, redirectTo, isExternal = false) {
|
|
|
1160
1160
|
|
|
1161
1161
|
const modules = [AuthComponent, AuthDirective, SignInDirective, SignOutDirective];
|
|
1162
1162
|
class AuthModule {
|
|
1163
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1164
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1165
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1163
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1164
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AuthModule, imports: [AuthComponent, AuthDirective, SignInDirective, SignOutDirective], exports: [AuthComponent, AuthDirective, SignInDirective, SignOutDirective] }); }
|
|
1165
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthModule, imports: [AuthComponent] }); }
|
|
1166
1166
|
}
|
|
1167
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AuthModule, decorators: [{
|
|
1168
1168
|
type: NgModule,
|
|
1169
1169
|
args: [{
|
|
1170
1170
|
imports: [...modules],
|