diff --git a/lib/core/src/lib/login/components/login-dialog-panel.component.html b/lib/core/src/lib/login/components/login-dialog-panel/login-dialog-panel.component.html
similarity index 60%
rename from lib/core/src/lib/login/components/login-dialog-panel.component.html
rename to lib/core/src/lib/login/components/login-dialog-panel/login-dialog-panel.component.html
index b0c1c0ab131..d8a2b9249db 100644
--- a/lib/core/src/lib/login/components/login-dialog-panel.component.html
+++ b/lib/core/src/lib/login/components/login-dialog-panel/login-dialog-panel.component.html
@@ -5,7 +5,11 @@
[showLoginActions]="false"
[backgroundImageUrl]="''"
(success)="onLoginSuccess($event)">
-
-
+
+
+
+
+
+
diff --git a/lib/core/src/lib/login/components/login-dialog-panel.component.scss b/lib/core/src/lib/login/components/login-dialog-panel/login-dialog-panel.component.scss
similarity index 100%
rename from lib/core/src/lib/login/components/login-dialog-panel.component.scss
rename to lib/core/src/lib/login/components/login-dialog-panel/login-dialog-panel.component.scss
diff --git a/lib/core/src/lib/login/components/login-dialog-panel.component.spec.ts b/lib/core/src/lib/login/components/login-dialog-panel/login-dialog-panel.component.spec.ts
similarity index 91%
rename from lib/core/src/lib/login/components/login-dialog-panel.component.spec.ts
rename to lib/core/src/lib/login/components/login-dialog-panel/login-dialog-panel.component.spec.ts
index 8d6d12a338c..a352c39e2a7 100644
--- a/lib/core/src/lib/login/components/login-dialog-panel.component.spec.ts
+++ b/lib/core/src/lib/login/components/login-dialog-panel/login-dialog-panel.component.spec.ts
@@ -15,13 +15,11 @@
* limitations under the License.
*/
+import { BasicAlfrescoAuthService, CoreTestingModule, LoginDialogPanelComponent } from '@alfresco/adf-core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { LoginDialogPanelComponent } from './login-dialog-panel.component';
-import { of } from 'rxjs';
-import { CoreTestingModule } from '../../testing/core.testing.module';
import { TranslateModule } from '@ngx-translate/core';
-import { BasicAlfrescoAuthService } from '../../auth/basic-auth/basic-alfresco-auth.service';
-import { OidcAuthenticationService } from '../../auth/services/oidc-authentication.service';
+import { of } from 'rxjs';
+import { OidcAuthenticationService } from '../../../auth/services/oidc-authentication.service';
describe('LoginDialogPanelComponent', () => {
let component: LoginDialogPanelComponent;
@@ -38,7 +36,7 @@ describe('LoginDialogPanelComponent', () => {
CoreTestingModule
],
providers: [
- { provide: OidcAuthenticationService, useValue: {}}
+ { provide: OidcAuthenticationService, useValue: {} }
]
});
fixture = TestBed.createComponent(LoginDialogPanelComponent);
diff --git a/lib/core/src/lib/login/components/login-dialog-panel.component.ts b/lib/core/src/lib/login/components/login-dialog-panel/login-dialog-panel.component.ts
similarity index 72%
rename from lib/core/src/lib/login/components/login-dialog-panel.component.ts
rename to lib/core/src/lib/login/components/login-dialog-panel/login-dialog-panel.component.ts
index f9c5967a46f..6b125606da5 100644
--- a/lib/core/src/lib/login/components/login-dialog-panel.component.ts
+++ b/lib/core/src/lib/login/components/login-dialog-panel/login-dialog-panel.component.ts
@@ -15,14 +15,22 @@
* limitations under the License.
*/
-import { Component, ViewEncapsulation, ViewChild, Output, EventEmitter } from '@angular/core';
-import { LoginComponent } from './login.component';
-import { LoginSuccessEvent } from '../models/login-success.event';
+import { Component, EventEmitter, Output, ViewChild, ViewEncapsulation } from '@angular/core';
+import { LoginFooterDirective } from '../../directives/login-footer.directive';
+import { LoginHeaderDirective } from '../../directives/login-header.directive';
+import { LoginSuccessEvent } from '../../models/login-success.event';
+import { LoginComponent } from '../login/login.component';
@Component({
selector: 'adf-login-dialog-panel',
+ standalone: true,
templateUrl: './login-dialog-panel.component.html',
styleUrls: ['./login-dialog-panel.component.scss'],
+ imports: [
+ LoginComponent,
+ LoginHeaderDirective,
+ LoginFooterDirective
+ ],
encapsulation: ViewEncapsulation.None
})
export class LoginDialogPanelComponent {
diff --git a/lib/core/src/lib/login/components/login-dialog.component.html b/lib/core/src/lib/login/components/login-dialog.component.html
deleted file mode 100644
index e161eaaa79d..00000000000
--- a/lib/core/src/lib/login/components/login-dialog.component.html
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/lib/core/src/lib/login/components/login-dialog-component-data.interface.ts b/lib/core/src/lib/login/components/login-dialog/login-dialog-component-data.interface.ts
similarity index 100%
rename from lib/core/src/lib/login/components/login-dialog-component-data.interface.ts
rename to lib/core/src/lib/login/components/login-dialog/login-dialog-component-data.interface.ts
diff --git a/lib/core/src/lib/login/components/login-dialog/login-dialog.component.html b/lib/core/src/lib/login/components/login-dialog/login-dialog.component.html
new file mode 100644
index 00000000000..b9405164952
--- /dev/null
+++ b/lib/core/src/lib/login/components/login-dialog/login-dialog.component.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/core/src/lib/login/components/login-dialog.component.scss b/lib/core/src/lib/login/components/login-dialog/login-dialog.component.scss
similarity index 100%
rename from lib/core/src/lib/login/components/login-dialog.component.scss
rename to lib/core/src/lib/login/components/login-dialog/login-dialog.component.scss
diff --git a/lib/core/src/lib/login/components/login-dialog.component.stories.ts b/lib/core/src/lib/login/components/login-dialog/login-dialog.component.stories.ts
similarity index 92%
rename from lib/core/src/lib/login/components/login-dialog.component.stories.ts
rename to lib/core/src/lib/login/components/login-dialog/login-dialog.component.stories.ts
index 550c79971a3..aac92c26f48 100644
--- a/lib/core/src/lib/login/components/login-dialog.component.stories.ts
+++ b/lib/core/src/lib/login/components/login-dialog/login-dialog.component.stories.ts
@@ -15,14 +15,14 @@
* limitations under the License.
*/
-import { Meta, moduleMetadata, Story } from '@storybook/angular';
-import { CoreStoryModule } from '../../testing/core.story.module';
+import { MatButtonModule } from '@angular/material/button';
import { RouterTestingModule } from '@angular/router/testing';
-import { LoginModule } from './../login.module';
+import { Meta, moduleMetadata, Story } from '@storybook/angular';
+import { AuthenticationService } from '../../../auth';
+import { AuthenticationMock } from '../../../auth/mock/authentication.service.mock';
+import { CoreStoryModule } from '../../../testing/core.story.module';
+import { LoginModule } from '../../login.module';
import { LoginDialogStorybookComponent } from './login-dialog.stories.component';
-import { MatButtonModule } from '@angular/material/button';
-import { AuthenticationService } from '../../auth/services/authentication.service';
-import { AuthenticationMock } from '../../auth/mock/authentication.service.mock';
export default {
component: LoginDialogStorybookComponent,
diff --git a/lib/core/src/lib/login/components/login-dialog.component.ts b/lib/core/src/lib/login/components/login-dialog/login-dialog.component.ts
similarity index 76%
rename from lib/core/src/lib/login/components/login-dialog.component.ts
rename to lib/core/src/lib/login/components/login-dialog/login-dialog.component.ts
index 4952db14c5b..aa361e7de30 100644
--- a/lib/core/src/lib/login/components/login-dialog.component.ts
+++ b/lib/core/src/lib/login/components/login-dialog/login-dialog.component.ts
@@ -15,14 +15,24 @@
* limitations under the License.
*/
-import { Component, Inject, ViewEncapsulation, ViewChild } from '@angular/core';
-import { MAT_DIALOG_DATA } from '@angular/material/dialog';
+import { Component, Inject, ViewChild, ViewEncapsulation } from '@angular/core';
+import { MatButtonModule } from '@angular/material/button';
+import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
+import { TranslateModule } from '@ngx-translate/core';
+import { LoginDialogPanelComponent } from '../login-dialog-panel/login-dialog-panel.component';
import { LoginDialogComponentData } from './login-dialog-component-data.interface';
-import { LoginDialogPanelComponent } from './login-dialog-panel.component';
+
@Component({
selector: 'adf-login-dialog',
+ standalone: true,
templateUrl: './login-dialog.component.html',
styleUrls: ['./login-dialog.component.scss'],
+ imports: [
+ MatDialogModule,
+ LoginDialogPanelComponent,
+ TranslateModule,
+ MatButtonModule
+ ],
encapsulation: ViewEncapsulation.None
})
export class LoginDialogComponent {
diff --git a/lib/core/src/lib/login/components/login-dialog.stories.component.ts b/lib/core/src/lib/login/components/login-dialog/login-dialog.stories.component.ts
similarity index 88%
rename from lib/core/src/lib/login/components/login-dialog.stories.component.ts
rename to lib/core/src/lib/login/components/login-dialog/login-dialog.stories.component.ts
index 011f40958d9..11c79cdeec1 100644
--- a/lib/core/src/lib/login/components/login-dialog.stories.component.ts
+++ b/lib/core/src/lib/login/components/login-dialog/login-dialog.stories.component.ts
@@ -16,6 +16,7 @@
*/
import { Component, Output, EventEmitter } from '@angular/core';
+import { MatButtonModule } from '@angular/material/button';
import { MatDialog } from '@angular/material/dialog';
import { Subject } from 'rxjs';
import { LoginDialogComponent } from './login-dialog.component';
@@ -23,9 +24,14 @@ import { LoginDialogComponentData } from './login-dialog-component-data.interfac
@Component({
selector: 'adf-login-dialog-storybook',
- template: ``
+ standalone: true,
+ imports: [
+ MatButtonModule
+ ],
+ template: `
+ `
})
export class LoginDialogStorybookComponent {
diff --git a/lib/core/src/lib/login/components/login.component.html b/lib/core/src/lib/login/components/login.component.html
deleted file mode 100644
index f2768bf6f4a..00000000000
--- a/lib/core/src/lib/login/components/login.component.html
+++ /dev/null
@@ -1,218 +0,0 @@
-
-
-
-
-
-
-
-
-
- {{ copyrightText }}
-
-
-
-
-
diff --git a/lib/core/src/lib/login/components/login/login.component.html b/lib/core/src/lib/login/components/login/login.component.html
new file mode 100644
index 00000000000..6f475b737eb
--- /dev/null
+++ b/lib/core/src/lib/login/components/login/login.component.html
@@ -0,0 +1,200 @@
+
+
+
+
+
+
+
+
+
+ {{ copyrightText }}
+
+
+
+
+
diff --git a/lib/core/src/lib/login/components/login.component.scss b/lib/core/src/lib/login/components/login/login.component.scss
similarity index 97%
rename from lib/core/src/lib/login/components/login.component.scss
rename to lib/core/src/lib/login/components/login/login.component.scss
index 3b0968b375d..029c046ec42 100644
--- a/lib/core/src/lib/login/components/login.component.scss
+++ b/lib/core/src/lib/login/components/login/login.component.scss
@@ -1,4 +1,4 @@
-@import '../../styles/mixins';
+@import '../../../styles/mixins';
.adf-login {
@include flex-column;
@@ -63,7 +63,7 @@
box-sizing: border-box;
}
- @media (max-width: 482px) {
+ @media screen and (width <= 482px) {
.adf-login-card-wide {
width: calc(100% - 32px);
}
@@ -185,6 +185,8 @@
.adf-login__field {
margin: 1em 0 0;
+ display: block;
+ padding-bottom: 18px;
font-size: var(--theme-subheading-2-font-size);
& input:-webkit-autofill {
@@ -221,13 +223,6 @@
opacity: 0.87;
}
- .adf-login__field {
- display: block;
- margin-left: auto;
- margin-right: auto;
- padding-bottom: 18px;
- }
-
.adf-login-remember-me:has(.adf-login-remember-me-label) {
color: var(--adf-theme-foreground-text-color);
}
diff --git a/lib/core/src/lib/login/components/login.component.spec.ts b/lib/core/src/lib/login/components/login/login.component.spec.ts
similarity index 97%
rename from lib/core/src/lib/login/components/login.component.spec.ts
rename to lib/core/src/lib/login/components/login/login.component.spec.ts
index 34a5d372834..a4a0f34e34f 100644
--- a/lib/core/src/lib/login/components/login.component.spec.ts
+++ b/lib/core/src/lib/login/components/login/login.component.spec.ts
@@ -15,21 +15,23 @@
* limitations under the License.
*/
+import {
+ AppConfigService,
+ AuthenticationService,
+ BasicAlfrescoAuthService,
+ CoreTestingModule,
+ LoginErrorEvent,
+ LoginSuccessEvent,
+ LogService,
+ UserPreferencesService
+} from '@alfresco/adf-core';
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
import { Validators } from '@angular/forms';
import { Router } from '@angular/router';
-import { UserPreferencesService } from '../../common/services/user-preferences.service';
-import { AppConfigService } from '../../app-config/app-config.service';
-import { AuthenticationService } from '../../auth/services/authentication.service';
-import { LoginErrorEvent } from '../models/login-error.event';
-import { LoginSuccessEvent } from '../models/login-success.event';
-import { LoginComponent } from './login.component';
import { EMPTY, of, throwError } from 'rxjs';
-import { CoreTestingModule } from '../../testing/core.testing.module';
-import { LogService } from '../../common/services/log.service';
-import { BasicAlfrescoAuthService } from '../../auth/basic-auth/basic-alfresco-auth.service';
-import { OidcAuthenticationService } from '../../auth/services/oidc-authentication.service';
+import { OidcAuthenticationService } from '../../../auth/services/oidc-authentication.service';
+import { LoginComponent } from './login.component';
describe('LoginComponent', () => {
let component: LoginComponent;
@@ -65,7 +67,8 @@ describe('LoginComponent', () => {
providers: [
{
provide: OidcAuthenticationService, useValue: {
- ssoLogin: () => { },
+ ssoLogin: () => {
+ },
isPublicUrl: () => false,
hasValidIdToken: () => false,
isLoggedIn: () => false
@@ -581,7 +584,7 @@ describe('LoginComponent', () => {
loginWithCredentials('fake-username-ECM-access-error', 'fake-password');
}));
- });
+ });
it('should trim the username value', () => {
usernameInput.value = 'username ';
@@ -623,7 +626,7 @@ describe('LoginComponent', () => {
});
loginWithCredentials('fake-username', 'fake-password');
- });
+ });
it('should emit success event after the login has succeeded and discard password', fakeAsync(() => {
spyOn(basicAlfrescoAuthService, 'login').and.returnValue(of({ type: 'type', ticket: 'ticket' }));
diff --git a/lib/core/src/lib/login/components/login.component.stories.ts b/lib/core/src/lib/login/components/login/login.component.stories.ts
similarity index 95%
rename from lib/core/src/lib/login/components/login.component.stories.ts
rename to lib/core/src/lib/login/components/login/login.component.stories.ts
index c9d9c07013b..404e7edd95e 100644
--- a/lib/core/src/lib/login/components/login.component.stories.ts
+++ b/lib/core/src/lib/login/components/login/login.component.stories.ts
@@ -15,13 +15,13 @@
* limitations under the License.
*/
+import { RouterModule } from '@angular/router';
import { Meta, moduleMetadata, Story } from '@storybook/angular';
-import { CoreStoryModule } from '../../testing/core.story.module';
-import { LoginModule } from '../login.module';
+import { AuthenticationService } from '../../../auth';
+import { AuthenticationMock } from '../../../auth/mock/authentication.service.mock';
+import { CoreStoryModule } from '../../../testing/core.story.module';
+import { LoginModule } from '../../login.module';
import { LoginComponent } from './login.component';
-import { RouterModule } from '@angular/router';
-import { AuthenticationService } from './../../auth/services/authentication.service';
-import { AuthenticationMock } from '../../auth/mock/authentication.service.mock';
export default {
component: LoginComponent,
diff --git a/lib/core/src/lib/login/components/login.component.ts b/lib/core/src/lib/login/components/login/login.component.ts
similarity index 78%
rename from lib/core/src/lib/login/components/login.component.ts
rename to lib/core/src/lib/login/components/login/login.component.ts
index d8c5da2154f..2faecefd4e3 100644
--- a/lib/core/src/lib/login/components/login.component.ts
+++ b/lib/core/src/lib/login/components/login/login.component.ts
@@ -15,22 +15,29 @@
* limitations under the License.
*/
-import { Component, EventEmitter, Input, OnInit, Output, TemplateRef, ViewEncapsulation, OnDestroy } from '@angular/core';
-import { AbstractControl, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
-import { Router, ActivatedRoute, Params } from '@angular/router';
-import { AuthenticationService } from '../../auth/services/authentication.service';
-import { TranslationService } from '../../translation/translation.service';
-import { UserPreferencesService } from '../../common/services/user-preferences.service';
-
-import { LoginErrorEvent } from '../models/login-error.event';
-import { LoginSubmitEvent } from '../models/login-submit.event';
-import { LoginSuccessEvent } from '../models/login-success.event';
-import { AppConfigService, AppConfigValues } from '../../app-config/app-config.service';
-import { DomSanitizer, SafeStyle } from '@angular/platform-browser';
+import { CommonModule } from '@angular/common';
+import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, TemplateRef, ViewEncapsulation } from '@angular/core';
+import { AbstractControl, ReactiveFormsModule, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
+import { MatButtonModule } from '@angular/material/button';
+import { MatCardModule } from '@angular/material/card';
+import { MatCheckboxModule } from '@angular/material/checkbox';
+import { MatFormFieldModule } from '@angular/material/form-field';
+import { MatIconModule } from '@angular/material/icon';
+import { MatInputModule } from '@angular/material/input';
+import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
+import { ActivatedRoute, Params, Router } from '@angular/router';
+import { TranslateModule } from '@ngx-translate/core';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
-import { BasicAlfrescoAuthService } from '../../auth/basic-auth/basic-alfresco-auth.service';
-import { OidcAuthenticationService } from '../../auth/services/oidc-authentication.service';
+import { AppConfigService, AppConfigValues } from '../../../app-config';
+import { AuthenticationService, BasicAlfrescoAuthService } from '../../../auth';
+import { OidcAuthenticationService } from '../../../auth/services/oidc-authentication.service';
+import { UserPreferencesService } from '../../../common';
+import { TranslationService } from '../../../translation';
+
+import { LoginErrorEvent } from '../../models/login-error.event';
+import { LoginSubmitEvent } from '../../models/login-submit.event';
+import { LoginSuccessEvent } from '../../models/login-success.event';
// eslint-disable-next-line no-shadow
enum LoginSteps {
@@ -47,14 +54,27 @@ interface ValidationMessage {
interface LoginFormValues {
username: string;
password: string;
-};
+}
@Component({
selector: 'adf-login',
+ standalone: true,
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss'],
encapsulation: ViewEncapsulation.None,
- host: {class: 'adf-login'}
+ imports: [
+ CommonModule,
+ MatCardModule,
+ ReactiveFormsModule,
+ TranslateModule,
+ MatIconModule,
+ MatFormFieldModule,
+ MatInputModule,
+ MatButtonModule,
+ MatProgressSpinnerModule,
+ MatCheckboxModule
+ ],
+ host: { class: 'adf-login' }
})
export class LoginComponent implements OnInit, OnDestroy {
isPasswordShow: boolean = false;
@@ -137,8 +157,7 @@ export class LoginComponent implements OnInit, OnDestroy {
private router: Router,
private appConfig: AppConfigService,
private userPreferences: UserPreferencesService,
- private route: ActivatedRoute,
- private sanitizer: DomSanitizer
+ private route: ActivatedRoute
) {}
ngOnInit() {
@@ -164,7 +183,7 @@ export class LoginComponent implements OnInit, OnDestroy {
const url = params['redirectUrl'];
const provider = this.appConfig.get(AppConfigValues.PROVIDERS);
- this.basicAlfrescoAuthService.setRedirect({provider, url});
+ this.basicAlfrescoAuthService.setRedirect({ provider, url });
});
}
@@ -197,7 +216,7 @@ export class LoginComponent implements OnInit, OnDestroy {
this.disableError();
const args = new LoginSubmitEvent({
- controls: {username: this.form.controls.username}
+ controls: { username: this.form.controls.username }
});
this.executeSubmit.emit(args);
@@ -243,30 +262,29 @@ export class LoginComponent implements OnInit, OnDestroy {
}
performLogin(values: { username: string; password: string }) {
- this.authService.login(values.username, values.password, this.rememberMe)
- .subscribe(
- async (token: any) => {
- const redirectUrl = this.basicAlfrescoAuthService.getRedirect();
-
- this.actualLoginStep = LoginSteps.Welcome;
- this.userPreferences.setStoragePrefix(values.username);
- values.password = null;
- this.success.emit(new LoginSuccessEvent(token, values.username, null));
-
- if (redirectUrl) {
- this.basicAlfrescoAuthService.setRedirect(null);
- await this.router.navigateByUrl(redirectUrl);
- } else if (this.successRoute) {
- await this.router.navigate([this.successRoute]);
- }
- },
- (err: any) => {
- this.actualLoginStep = LoginSteps.Landing;
- this.displayErrorMessage(err);
- this.isError = true;
- this.error.emit(new LoginErrorEvent(err));
+ this.authService.login(values.username, values.password, this.rememberMe).subscribe(
+ async (token: any) => {
+ const redirectUrl = this.basicAlfrescoAuthService.getRedirect();
+
+ this.actualLoginStep = LoginSteps.Welcome;
+ this.userPreferences.setStoragePrefix(values.username);
+ values.password = null;
+ this.success.emit(new LoginSuccessEvent(token, values.username, null));
+
+ if (redirectUrl) {
+ this.basicAlfrescoAuthService.setRedirect(null);
+ await this.router.navigateByUrl(redirectUrl);
+ } else if (this.successRoute) {
+ await this.router.navigate([this.successRoute]);
}
- );
+ },
+ (err: any) => {
+ this.actualLoginStep = LoginSteps.Landing;
+ this.displayErrorMessage(err);
+ this.isError = true;
+ this.error.emit(new LoginErrorEvent(err));
+ }
+ );
}
/**
@@ -342,10 +360,6 @@ export class LoginComponent implements OnInit, OnDestroy {
event.target.value = event.target.value.trim();
}
- getBackgroundUrlImageUrl(): SafeStyle {
- return this.sanitizer.bypassSecurityTrustStyle(`url(${this.backgroundImageUrl})`);
- }
-
/**
* Default formError values
*/
diff --git a/lib/core/src/lib/login/directives/login-footer.directive.spec.ts b/lib/core/src/lib/login/directives/login-footer.directive.spec.ts
index bde2728e773..e5615884043 100644
--- a/lib/core/src/lib/login/directives/login-footer.directive.spec.ts
+++ b/lib/core/src/lib/login/directives/login-footer.directive.spec.ts
@@ -15,10 +15,8 @@
* limitations under the License.
*/
-import { TestBed, ComponentFixture } from '@angular/core/testing';
-import { LoginComponent } from '../components/login.component';
-import { LoginFooterDirective } from './login-footer.directive';
-import { CoreTestingModule } from '../../testing/core.testing.module';
+import { CoreTestingModule, LoginComponent, LoginFooterDirective } from '@alfresco/adf-core';
+import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TranslateModule } from '@ngx-translate/core';
import { OidcAuthenticationService } from '../../auth/services/oidc-authentication.service';
diff --git a/lib/core/src/lib/login/directives/login-footer.directive.ts b/lib/core/src/lib/login/directives/login-footer.directive.ts
index 76e00cb045a..841c377ba44 100644
--- a/lib/core/src/lib/login/directives/login-footer.directive.ts
+++ b/lib/core/src/lib/login/directives/login-footer.directive.ts
@@ -15,27 +15,18 @@
* limitations under the License.
*/
-import {
- AfterContentInit,
- ContentChild,
- Directive,
- TemplateRef
-} from '@angular/core';
-import { LoginComponent } from '../components/login.component';
+import { AfterContentInit, ContentChild, Directive, TemplateRef } from '@angular/core';
+import { LoginComponent } from '../components/login/login.component';
-/**
- * Directive selectors without adf- prefix will be deprecated on 3.0.0
- */
@Directive({
- selector: 'adf-login-footer, login-footer'
+ selector: 'adf-login-footer',
+ standalone: true
})
export class LoginFooterDirective implements AfterContentInit {
-
@ContentChild(TemplateRef)
template: any;
- constructor(
- private alfrescoLoginComponent: LoginComponent) {
+ constructor(private alfrescoLoginComponent: LoginComponent) {
}
ngAfterContentInit() {
diff --git a/lib/core/src/lib/login/directives/login-header.directive.spec.ts b/lib/core/src/lib/login/directives/login-header.directive.spec.ts
index c255e4c9ed7..01d75e2e1dd 100644
--- a/lib/core/src/lib/login/directives/login-header.directive.spec.ts
+++ b/lib/core/src/lib/login/directives/login-header.directive.spec.ts
@@ -15,10 +15,8 @@
* limitations under the License.
*/
-import { TestBed, ComponentFixture } from '@angular/core/testing';
-import { LoginComponent } from '../components/login.component';
-import { LoginHeaderDirective } from './login-header.directive';
-import { CoreTestingModule } from '../../testing/core.testing.module';
+import { CoreTestingModule, LoginComponent, LoginHeaderDirective } from '@alfresco/adf-core';
+import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TranslateModule } from '@ngx-translate/core';
import { OidcAuthenticationService } from '../../auth/services/oidc-authentication.service';
diff --git a/lib/core/src/lib/login/directives/login-header.directive.ts b/lib/core/src/lib/login/directives/login-header.directive.ts
index cdfe6f2b368..42d8cc1bb35 100644
--- a/lib/core/src/lib/login/directives/login-header.directive.ts
+++ b/lib/core/src/lib/login/directives/login-header.directive.ts
@@ -15,27 +15,18 @@
* limitations under the License.
*/
-import {
- AfterContentInit,
- ContentChild,
- Directive,
- TemplateRef
-} from '@angular/core';
-import { LoginComponent } from '../components/login.component';
+import { AfterContentInit, ContentChild, Directive, TemplateRef } from '@angular/core';
+import { LoginComponent } from '../components/login/login.component';
-/**
- * Directive selectors without adf- prefix will be deprecated on 3.0.0
- */
@Directive({
- selector: 'adf-login-header, login-header'
+ selector: 'adf-login-header',
+ standalone: true
})
export class LoginHeaderDirective implements AfterContentInit {
-
@ContentChild(TemplateRef)
template: any;
- constructor(
- private alfrescoLoginComponent: LoginComponent) {
+ constructor(private alfrescoLoginComponent: LoginComponent) {
}
ngAfterContentInit() {
diff --git a/lib/core/src/lib/login/login.module.ts b/lib/core/src/lib/login/login.module.ts
index a7047b0b680..96c5936e672 100644
--- a/lib/core/src/lib/login/login.module.ts
+++ b/lib/core/src/lib/login/login.module.ts
@@ -15,29 +15,16 @@
* limitations under the License.
*/
-import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
-import { FormsModule, ReactiveFormsModule } from '@angular/forms';
-import { RouterModule } from '@angular/router';
-import { TranslateModule } from '@ngx-translate/core';
-import { MaterialModule } from '../material.module';
+import { LoginDialogPanelComponent } from './components/login-dialog-panel/login-dialog-panel.component';
+import { LoginDialogComponent } from './components/login-dialog/login-dialog.component';
-import { LoginComponent } from './components/login.component';
+import { LoginComponent } from './components/login/login.component';
import { LoginFooterDirective } from './directives/login-footer.directive';
import { LoginHeaderDirective } from './directives/login-header.directive';
-import { LoginDialogComponent } from './components/login-dialog.component';
-import { LoginDialogPanelComponent } from './components/login-dialog-panel.component';
@NgModule({
imports: [
- RouterModule,
- MaterialModule,
- FormsModule,
- ReactiveFormsModule,
- CommonModule,
- TranslateModule
- ],
- declarations: [
LoginComponent,
LoginFooterDirective,
LoginHeaderDirective,
diff --git a/lib/core/src/lib/login/models/login-success.event.ts b/lib/core/src/lib/login/models/login-success.event.ts
index 06e110290d8..36ab71a69bc 100644
--- a/lib/core/src/lib/login/models/login-success.event.ts
+++ b/lib/core/src/lib/login/models/login-success.event.ts
@@ -19,6 +19,6 @@ export class LoginSuccessEvent {
constructor(
public token: any,
public username: string,
- public password: string) {
- }
+ public password: string
+ ) {}
}
diff --git a/lib/core/src/lib/login/public-api.ts b/lib/core/src/lib/login/public-api.ts
index 19d61bbead6..e43d40e58ed 100644
--- a/lib/core/src/lib/login/public-api.ts
+++ b/lib/core/src/lib/login/public-api.ts
@@ -18,10 +18,10 @@
export * from './directives/login-header.directive';
export * from './directives/login-footer.directive';
-export * from './components/login.component';
-export * from './components/login-dialog.component';
-export * from './components/login-dialog-component-data.interface';
-export * from './components/login-dialog-panel.component';
+export * from './components/login/login.component';
+export * from './components/login-dialog/login-dialog.component';
+export * from './components/login-dialog/login-dialog-component-data.interface';
+export * from './components/login-dialog-panel/login-dialog-panel.component';
export * from './models/login-error.event';
export * from './models/login-submit.event';