mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-10779] User info component refactor (#8187)
* [AAE-10779] Update documentation * [AAE-10779] Update demo-shell user-info component call * [AAE-10779] Ecm user info component * [AAE-10779] Identity user info component * [AAE-10779] Bpm user info component * [AAE-10779] Remove ecm-panel id references * [AAE-10779] add stories and remove old component * [AAE-10779] Update doc version and remove leftover html tag * trigger travis * [AAE-10779] rename ecm-user-info to content-user-info and bpm-user-info to process-user-info * [AAE-10779] update docs * [AAE-10779] fix demo-shell user-info * [AAE-10779] add docs
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
---
|
||||
Title: Content User Info component
|
||||
Added: v6.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2023-01-24
|
||||
---
|
||||
|
||||
# [Content User Info component](../../../lib/content-services/src/lib/content-user-info/content-user-info.component.ts "Defined in content-user-info.component.ts")
|
||||
|
||||
Shows user information for `CONTENT` and `CONTENT_SSO` mode.
|
||||
|
||||
## Basic usage
|
||||
|
||||
```html
|
||||
<adf-content-user-info></adf-content-user-info>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| isLoggedIn | `boolean` | Is user logged in |
|
||||
| EcmUser | `EcmUserModel` | Ecm user model. |
|
||||
| identityUser | `IdentityUserModel` | Identity user model. |
|
||||
| mode | `UserInfoMode` | `UserInfoMode.CONTENT` | current mode. |
|
||||
| bpmBackgroundImage | `string` | | Custom path for the background banner image for APS users. |
|
||||
| EcmBackgroundImage | `string` | | Custom path for the background banner image for ACS users. |
|
||||
| menuPositionX | [`MenuPositionX`](https://github.com/angular/components/blob/master/src/material/menu/menu-positions.ts) | "after" | Custom choice for opening the menu at the bottom. Can be `before` or `after`. |
|
||||
| menuPositionY | [`MenuPositionY`](https://github.com/angular/components/blob/master/src/material/menu/menu-positions.ts) | "below" | Custom choice for opening the menu at the bottom. Can be `above` or `below`. |
|
||||
| namePosition | `string` | "right" | When the username is shown, this defines its position relative to the user info button. Can be `right` or `left`. |
|
||||
| showName | `boolean` | true | Shows/hides the username next to the user info button. |
|
||||
|
||||
## Details
|
||||
|
||||
The component shows a round icon for the user and will show extra information about
|
||||
the user when clicked.
|
@@ -1,18 +1,18 @@
|
||||
---
|
||||
Title: User Info component
|
||||
Added: v2.0.0
|
||||
Title: Identity User Info component
|
||||
Added: v6.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-11-19
|
||||
Last reviewed: 2023-01-24
|
||||
---
|
||||
|
||||
# [User Info component](../../../lib/core/src/lib/userinfo/components/user-info.component.ts "Defined in user-info.component.ts")
|
||||
# [Identity User Info component](../../../lib/core/src/lib/identity-user-info/identity-user-info.component.ts "Defined in identityuser-info.component.ts")
|
||||
|
||||
Shows user information.
|
||||
Shows user information for SSO mode.
|
||||
|
||||
## Basic usage
|
||||
|
||||
```html
|
||||
<adf-userinfo></adf-userinfo>
|
||||
<adf-identity-user-info></adf-identity-user-info>
|
||||
```
|
||||
|
||||
## Class members
|
||||
@@ -21,6 +21,8 @@ Shows user information.
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| isLoggedIn | `boolean` | Is user logged in |
|
||||
| identityUser | `IdentityUserModel` | Identity user model. |
|
||||
| bpmBackgroundImage | `string` | | Custom path for the background banner image for APS users. |
|
||||
| ecmBackgroundImage | `string` | | Custom path for the background banner image for ACS users. |
|
||||
| menuPositionX | [`MenuPositionX`](https://github.com/angular/components/blob/master/src/material/menu/menu-positions.ts) | "after" | Custom choice for opening the menu at the bottom. Can be `before` or `after`. |
|
||||
@@ -32,5 +34,3 @@ Shows user information.
|
||||
|
||||
The component shows a round icon for the user and will show extra information about
|
||||
the user when clicked.
|
||||
If user is logged in with both ACS and APS, the ACS image will be shown.
|
||||
In case of SSO authentication, the information related to the user like firstname, lastname will be fetched using the Keycloak [`Api`](../../../lib/testing/src/lib/core/structure/api.ts)
|
@@ -0,0 +1,38 @@
|
||||
---
|
||||
Title: Process User Info component
|
||||
Added: v6.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2023-01-24
|
||||
---
|
||||
|
||||
# [Process User Info component](../../../lib/process-services/src/lib/process-user-info/process-user-info.component.ts "Defined in process-user-info.component.ts")
|
||||
|
||||
Shows user information for `PROCESS` and `ALL` mode.
|
||||
|
||||
## Basic usage
|
||||
|
||||
```html
|
||||
<adf-process-user-info></adf-process-user-info>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| isLoggedIn | `boolean` | Is user logged in |
|
||||
| bpmUser | `BpmUserModel` | Bpm user model. |
|
||||
| ecmUser | `EpmUserModel` | Ecm user model. |
|
||||
| mode | `UserInfoMode` | `UserInfoMode.PROCESS` | current mode. |
|
||||
| bpmBackgroundImage | `string` | | Custom path for the background banner image for APS users. |
|
||||
| BpmBackgroundImage | `string` | | Custom path for the background banner image for ACS users. |
|
||||
| menuPositionX | [`MenuPositionX`](https://github.com/angular/components/blob/master/src/material/menu/menu-positions.ts) | "after" | Custom choice for opening the menu at the bottom. Can be `before` or `after`. |
|
||||
| menuPositionY | [`MenuPositionY`](https://github.com/angular/components/blob/master/src/material/menu/menu-positions.ts) | "below" | Custom choice for opening the menu at the bottom. Can be `above` or `below`. |
|
||||
| namePosition | `string` | "right" | When the username is shown, this defines its position relative to the user info button. Can be `right` or `left`. |
|
||||
| showName | `boolean` | true | Shows/hides the username next to the user info button. |
|
||||
|
||||
## Details
|
||||
|
||||
The component shows a round icon for the user and will show extra information about
|
||||
the user when clicked.
|
@@ -86,6 +86,7 @@ How to fix it:
|
||||
| Class | Before | After |
|
||||
| --- | -- | --- |
|
||||
| `LoginDialogService` | `@alfresco/adf-core`|
|
||||
| `UserInfoComponent` | `@alfresco/adf-core`|
|
||||
|
||||
### DataColumnModule
|
||||
|
||||
@@ -225,6 +226,16 @@ The ```adf-comments``` has now two specialization in :
|
||||
From v.6.0.0 and after [`ViewerComponent`](../../docs/core/components/viewer.component.md) no longer show content from ACS, so instead of taking `nodeId` as `@Input`, it takes `blobFile` and `urlFile`. For more details check the [`PR`](https://github.com/Alfresco/alfresco-ng2-components/pull/7992).
|
||||
If you need to display content from ACS you can use instead the new [`AlfrescoViewerComponent`](../../docs/content-services/components/alfresco-viewer.component.md)
|
||||
|
||||
### UserInfoComponent
|
||||
From v.6.0.0 and after ```UserInfoComponent``` is no longer active.
|
||||
|
||||
In its place there are now 3 presentational components:
|
||||
- [`IdentityUserInfoComponent`](../../docs/core/components/identity-user-info.component.md) present in core
|
||||
- [`ContentUserInfoComponent`](../../docs/content-services/components/content-user-info.component.md) present in content-services
|
||||
- [`ProcessUserInfoComponent`](../../docs/process-services/components/process-user-info.component.md) present in process-services
|
||||
|
||||
To build a similar logic to the one in ```UserInfoComponent``` check implementation on [`demo-shell`](../../demo-shell/src/app/components/app-layout/user-info/user-info.component.ts)
|
||||
|
||||
## Renamed items
|
||||
|
||||
### New Classes or Services
|
||||
|
Reference in New Issue
Block a user