Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

add user profile widget RELEASE #122

Merged
merged 6 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,28 @@ The `AuditManagement` widget will let you embed an audit table in your site.
Example:
[Manage Audit](./projects/demo-app/src/app/manage-audit/manage-audit.component.html)

#### UserProfile

The `UserProfile` widget lets you embed a user profile component in your app and let the logged in user update his profile.

The widget lets you:

- Update user profile picture
- Update user personal information
- Update authentication methods
- Logout

###### Usage

```angular2html
<user-profile widgetId="user-profile-widget"
(logout)="<your_logout_function>"
dorsha marked this conversation as resolved.
Show resolved Hide resolved
/>
```

Example:
[My User Profile](./projects/demo-app/src/app/my-user-profile/my-user-profile.component.html)

## Code Example

You can find an example angular app in the [examples folder](./projects/demo-app).
Expand Down
156 changes: 92 additions & 64 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
]
},
"dependencies": {
"@descope/access-key-management-widget": "0.1.35",
"@descope/audit-management-widget": "0.1.0",
"@descope/role-management-widget": "0.1.35",
"@descope/user-management-widget": "0.4.36",
"@descope/web-component": "3.8.39",
"@descope/access-key-management-widget": "0.1.51",
"@descope/audit-management-widget": "0.1.14",
"@descope/role-management-widget": "0.1.49",
"@descope/user-management-widget": "0.4.51",
"@descope/user-profile-widget": "0.0.15",
nirgur marked this conversation as resolved.
Show resolved Hide resolved
"@descope/web-component": "3.11.9",
"tslib": "^2.3.0"
},
"optionalDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion projects/angular-sdk/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"@descope/user-management-widget",
"@descope/role-management-widget",
"@descope/access-key-management-widget",
"@descope/audit-management-widget"
"@descope/audit-management-widget",
"@descope/user-profile-widget"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ describe('DescopeAccessKeyManagementComponent', () => {
component.projectId = '123';
component.tenant = 'tenant-1';
component.widgetId = 'widget-1';
component.logger = { info: jest.fn(), error: jest.fn(), warn: jest.fn() };
component.logger = {
info: jest.fn(),
error: jest.fn(),
warn: jest.fn(),
debug: jest.fn()
};
fixture.detectChanges();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ describe('DescopeAuditManagementComponent', () => {
component.projectId = '123';
component.tenant = 'tenant-1';
component.widgetId = 'widget-1';
component.logger = { info: jest.fn(), error: jest.fn(), warn: jest.fn() };
component.logger = {
info: jest.fn(),
error: jest.fn(),
warn: jest.fn(),
debug: jest.fn()
};
fixture.detectChanges();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ describe('DescopeComponent', () => {
component.locale = 'en-US';
component.success = new EventEmitter<CustomEvent>();
component.error = new EventEmitter<CustomEvent>();
component.logger = { info: jest.fn(), error: jest.fn(), warn: jest.fn() };
component.logger = {
info: jest.fn(),
error: jest.fn(),
warn: jest.fn(),
debug: jest.fn()
};
component.errorTransformer = jest.fn();
component.client = {};
component.form = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ describe('DescopeRoleManagementComponent', () => {
component.projectId = '123';
component.tenant = 'tenant-1';
component.widgetId = 'widget-1';
component.logger = { info: jest.fn(), error: jest.fn(), warn: jest.fn() };
component.logger = {
info: jest.fn(),
error: jest.fn(),
warn: jest.fn(),
debug: jest.fn()
};
fixture.detectChanges();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ describe('DescopeUserManagementComponent', () => {
component.projectId = '123';
component.tenant = 'tenant-1';
component.widgetId = 'widget-1';
component.logger = { info: jest.fn(), error: jest.fn(), warn: jest.fn() };
component.logger = {
info: jest.fn(),
error: jest.fn(),
warn: jest.fn(),
debug: jest.fn()
};
fixture.detectChanges();
});

Expand Down
Loading
Loading