[ACS-5308] reduce various modules by switching to standalone (#3248)

* crate-form-template dialog

* remove unused module

* viewer profile component

* trashcan component

* remove test dependency on global material module

* remove unused test imports

* break CoreModule dependency

* login component

* remove app material module

* remove languages from the config as not needed
This commit is contained in:
Denys Vuika
2023-06-05 09:10:03 +01:00
committed by GitHub
parent c4bd16f9aa
commit f4600b588a
35 changed files with 132 additions and 320 deletions

View File

@@ -23,13 +23,10 @@
*/
import { TestBed, ComponentFixture } from '@angular/core/testing';
import { AppConfigModule } from '@alfresco/adf-core';
import { ViewProfileComponent } from './view-profile.component';
import { AppTestingModule } from '../../testing/app-testing.module';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { By } from '@angular/platform-browser';
import { Router } from '@angular/router';
import { MatDividerModule } from '@angular/material/divider';
import { BehaviorSubject, Subject } from 'rxjs';
import { AppService } from '@alfresco/aca-shared';
@@ -44,8 +41,7 @@ describe('ViewProfileComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [AppTestingModule, AppConfigModule, FormsModule, ReactiveFormsModule, MatDividerModule],
declarations: [ViewProfileComponent],
imports: [AppTestingModule, ViewProfileComponent],
providers: [
{
provide: AppService,

View File

@@ -25,13 +25,21 @@
import { AlfrescoApiService } from '@alfresco/adf-core';
import { PeopleApi, Person } from '@alfresco/js-api';
import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { Observable, Subject, throwError } from 'rxjs';
import { AppService } from '@alfresco/aca-shared';
import { takeUntil } from 'rxjs/operators';
import { CommonModule } from '@angular/common';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { TranslateModule } from '@ngx-translate/core';
import { MatDividerModule } from '@angular/material/divider';
import { MatFormFieldModule } from '@angular/material/form-field';
@Component({
standalone: true,
imports: [CommonModule, TranslateModule, ReactiveFormsModule, MatButtonModule, MatIconModule, MatDividerModule, MatFormFieldModule],
selector: 'app-view-profile',
templateUrl: './view-profile.component.html',
styleUrls: ['./view-profile.component.scss'],

View File

@@ -1,34 +0,0 @@
/*!
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Alfresco Example Content Application
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { NgModule } from '@angular/core';
import { ViewProfileComponent } from './view-profile.component';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
@NgModule({
imports: [CommonModule, CoreModule.forChild()],
declarations: [ViewProfileComponent]
})
export class ViewProfileModule {}