Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 10 commits into from
Jun 5, 2023
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
71 changes: 0 additions & 71 deletions app/src/app.config.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -65,77 +65,6 @@
"preserveState": true,
"expandedSidenav": true
},
"languages": [
{
"key": "de",
"label": "Deutsch"
},
{
"key": "en",
"label": "English"
},
{
"key": "es",
"label": "Español"
},
{
"key": "fr",
"label": "Français"
},
{
"key": "it",
"label": "Italiano"
},
{
"key": "ja",
"label": "日本語"
},
{
"key": "nb",
"label": "Bokmål"
},
{
"key": "nl",
"label": "Nederlands"
},
{
"key": "pt-BR",
"label": "Português (Brasil)"
},
{
"key": "ru",
"label": "Русский"
},
{
"key": "zh-CN",
"label": "中文简体"
},
{
"key": "cs",
"label": "Čeština"
},
{
"key": "da",
"label": "Dansk"
},
{
"key": "fi",
"label": "Suomi"
},
{
"key": "pl",
"label": "Polski"
},
{
"key": "sv",
"label": "Svenska"
},
{
"key": "ar",
"label": "العربية",
"direction": "rtl"
}
],
"mimeTypes": [
{
"value": "video/3gpp",
Expand Down
4 changes: 2 additions & 2 deletions app/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import { STORE_INITIAL_APP_DATA } from '@alfresco/aca-shared/store';
import { ShellModule, SHELL_APP_SERVICE, SHELL_AUTH_TOKEN } from '@alfresco/adf-core/shell';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { APP_ROUTES } from './app.routes';
import { AppLoginModule } from './components/login/login.module';
import { LoginComponent } from './components/login/login.component';

registerLocaleData(localeFr);
registerLocaleData(localeDe);
Expand All @@ -90,7 +90,7 @@ registerLocaleData(localeSv);
CoreModule.forRoot(),
SharedModule,
CoreExtensionsModule.forRoot(),
AppLoginModule,
LoginComponent,
environment.e2e ? NoopAnimationsModule : BrowserAnimationsModule,
!environment.production ? StoreDevtoolsModule.instrument({ maxAge: 25 }) : [],
RouterModule.forRoot(APP_ROUTES, {
Expand Down
4 changes: 4 additions & 0 deletions app/src/app/components/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/

import { AppConfigModule, LoginModule } from '@alfresco/adf-core';
import { Component } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core';

@Component({
standalone: true,
imports: [LoginModule, AppConfigModule, TranslateModule],
templateUrl: './login.component.html'
})
export class LoginComponent {}
36 changes: 0 additions & 36 deletions app/src/app/components/login/login.module.ts

This file was deleted.

45 changes: 0 additions & 45 deletions app/src/app/material.module.ts

This file was deleted.

12 changes: 6 additions & 6 deletions projects/aca-content/src/lib/aca-content.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import * as rules from '@alfresco/aca-shared/rules';
import { FilesComponent } from './components/files/files.component';
import { LibrariesComponent } from './components/libraries/libraries.component';
import { FavoriteLibrariesComponent } from './components/favorite-libraries/favorite-libraries.component';
import { ViewProfileModule } from './components/view-profile/view-profile.module';

import { AppStoreModule } from './store/app-store.module';
import { MaterialModule } from './material.module';
Expand Down Expand Up @@ -83,7 +82,6 @@ import { ViewNodeComponent } from './components/toolbar/view-node/view-node.comp
import { CONTENT_ROUTES } from './aca-content.routes';
import { RouterModule } from '@angular/router';
import { UploadFilesDialogComponent } from './components/upload-files-dialog/upload-files-dialog.component';
import { AppTrashcanModule } from './components/trashcan/trashcan.module';
import { AppSharedLinkViewModule } from './components/shared-link-view/shared-link-view.module';
import { AcaFolderRulesModule } from '@alfresco/aca-folder-rules';
import { TagsColumnComponent } from './components/dl-custom-components/tags-column/tags-column.component';
Expand All @@ -93,6 +91,8 @@ import { ContentManagementService } from './services/content-management.service'
import { ShellLayoutComponent, SHELL_NAVBAR_MIN_WIDTH } from '@alfresco/adf-core/shell';
import { UserMenuComponent } from './components/sidenav/user-menu/user-menu.component';
import { ContextMenuComponent } from './components/context-menu/context-menu.component';
import { ViewProfileComponent } from './components/view-profile/view-profile.component';
import { TrashcanComponent } from './components/trashcan/trashcan.component';

@NgModule({
imports: [
Expand All @@ -118,12 +118,13 @@ import { ContextMenuComponent } from './components/context-menu/context-menu.com
AppSearchInputModule,
AppSearchResultsModule,
HammerModule,
ViewProfileModule,
AppTrashcanModule,
ViewProfileComponent,
TrashcanComponent,
AppSharedLinkViewModule,
AcaFolderRulesModule,
GenericErrorComponent,
DetailsComponent
DetailsComponent,
CreateFromTemplateDialogComponent
],
declarations: [
FilesComponent,
Expand All @@ -132,7 +133,6 @@ import { ContextMenuComponent } from './components/context-menu/context-menu.com
FavoritesComponent,
RecentFilesComponent,
SharedFilesComponent,
CreateFromTemplateDialogComponent,
HomeComponent,
UploadFilesDialogComponent
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,12 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/

import { NgModule } from '@angular/core';
import { LocationLinkComponent } from './location-link/location-link.component';
import { ToggleSharedComponent } from './toggle-shared/toggle-shared.component';
import { LanguagePickerComponent } from './language-picker/language-picker.component';
import { LogoutComponent } from './logout/logout.component';
import { UserInfoComponent } from './user-info/user-info.component';

/**
* @deprecated Use `APP_COMMON_DIRECTIVES` instead
*/
@NgModule({
imports: [LanguagePickerComponent, LocationLinkComponent, LogoutComponent, ToggleSharedComponent, UserInfoComponent]
})
export class AppCommonModule {}

export const APP_COMMON_DIRECTIVES = [
LanguagePickerComponent,
LocationLinkComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { CustomNameColumnComponent } from './name-column.component';
import { Actions } from '@ngrx/effects';
import { StoreModule } from '@ngrx/store';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { CoreModule } from '@alfresco/adf-core';
import { HttpClientModule } from '@angular/common/http';
import { TranslateModule } from '@ngx-translate/core';

describe('CustomNameColumnComponent', () => {
Expand All @@ -35,12 +35,7 @@ describe('CustomNameColumnComponent', () => {

beforeEach(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot(),
CoreModule.forRoot(),
CustomNameColumnComponent,
StoreModule.forRoot({ app: () => {} }, { initialState: {} })
],
imports: [HttpClientModule, TranslateModule.forRoot(), CustomNameColumnComponent, StoreModule.forRoot({ app: () => {} }, { initialState: {} })],
providers: [Actions]
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { Router } from '@angular/router';
import { AlfrescoApiService, AppConfigModule, DataTableComponent, UserPreferencesService } from '@alfresco/adf-core';
import { AlfrescoApiService, DataTableComponent, UserPreferencesService } from '@alfresco/adf-core';
import { DocumentListComponent, NodeFavoriteDirective } from '@alfresco/adf-content-services';
import { FavoriteLibrariesComponent } from './favorite-libraries.component';
import { AppTestingModule } from '../../testing/app-testing.module';
Expand All @@ -35,6 +35,8 @@ import { RouterEffects } from '@alfresco/aca-shared/store';
import { of, throwError } from 'rxjs';
import { LibraryEffects } from '../../store/effects';
import { NodeEntry } from '@alfresco/js-api';
import { MatDialogModule } from '@angular/material/dialog';
import { MatSnackBarModule } from '@angular/material/snack-bar';

describe('FavoriteLibrariesComponent', () => {
let fixture: ComponentFixture<FavoriteLibrariesComponent>;
Expand All @@ -57,7 +59,7 @@ describe('FavoriteLibrariesComponent', () => {

beforeEach(() => {
TestBed.configureTestingModule({
imports: [AppTestingModule, EffectsModule.forRoot([RouterEffects, LibraryEffects]), AppConfigModule],
imports: [AppTestingModule, EffectsModule.forRoot([RouterEffects, LibraryEffects]), MatDialogModule, MatSnackBarModule],
declarations: [DataTableComponent, NodeFavoriteDirective, DocumentListComponent, FavoriteLibrariesComponent],
schemas: [NO_ERRORS_SCHEMA]
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { Router } from '@angular/router';
import { TestBed, ComponentFixture } from '@angular/core/testing';
import { DataTableComponent, AppConfigModule } from '@alfresco/adf-core';
import { DataTableComponent } from '@alfresco/adf-core';
import { CustomResourcesService, DocumentListComponent, NodeFavoriteDirective } from '@alfresco/adf-content-services';
import { of } from 'rxjs';
import { FavoritesComponent } from './favorites.component';
import { AppTestingModule } from '../../testing/app-testing.module';
import { ContentApiService } from '@alfresco/aca-shared';
import { MatDialogModule } from '@angular/material/dialog';
import { MatSnackBarModule } from '@angular/material/snack-bar';

describe('FavoritesComponent', () => {
let fixture: ComponentFixture<FavoritesComponent>;
Expand All @@ -41,7 +43,7 @@ describe('FavoritesComponent', () => {

beforeEach(() => {
TestBed.configureTestingModule({
imports: [AppTestingModule, AppConfigModule],
imports: [AppTestingModule, MatDialogModule, MatSnackBarModule],
declarations: [DataTableComponent, NodeFavoriteDirective, DocumentListComponent, FavoritesComponent],
providers: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import { TestBed, fakeAsync, tick, ComponentFixture } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA, SimpleChange, SimpleChanges } from '@angular/core';
import { Router, ActivatedRoute, convertToParamMap } from '@angular/router';
import { DataTableComponent, AppConfigModule, DataTableModule, PaginationModule } from '@alfresco/adf-core';
import { DataTableComponent, DataTableModule, PaginationModule } from '@alfresco/adf-core';
import {
DocumentListComponent,
DocumentListService,
Expand Down Expand Up @@ -72,7 +72,7 @@ describe('FilesComponent', () => {

beforeEach(() => {
TestBed.configureTestingModule({
imports: [AppTestingModule, DataTableModule, PaginationModule, SharedDirectivesModule, DirectivesModule, AppConfigModule],
imports: [AppTestingModule, DataTableModule, PaginationModule, SharedDirectivesModule, DirectivesModule],
declarations: [FilesComponent, DataTableComponent, NodeFavoriteDirective, DocumentListComponent],
providers: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
import { TestBed, ComponentFixture } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { Router } from '@angular/router';
import { AlfrescoApiService, DataTableComponent, AppConfigModule } from '@alfresco/adf-core';
import { AlfrescoApiService, DataTableComponent } from '@alfresco/adf-core';
import { DocumentListComponent, NodeFavoriteDirective } from '@alfresco/adf-content-services';
import { LibrariesComponent } from './libraries.component';
import { AppTestingModule } from '../../testing/app-testing.module';
import { EffectsModule } from '@ngrx/effects';
import { LibraryEffects } from '../../store/effects';
import { ContentApiService } from '@alfresco/aca-shared';
import { MatDialogModule } from '@angular/material/dialog';
import { MatSnackBarModule } from '@angular/material/snack-bar';

describe('LibrariesComponent', () => {
let fixture: ComponentFixture<LibrariesComponent>;
Expand All @@ -52,7 +54,7 @@ describe('LibrariesComponent', () => {

beforeEach(() => {
TestBed.configureTestingModule({
imports: [AppTestingModule, EffectsModule.forRoot([LibraryEffects]), AppConfigModule],
imports: [AppTestingModule, EffectsModule.forRoot([LibraryEffects]), MatDialogModule, MatSnackBarModule],
declarations: [DataTableComponent, NodeFavoriteDirective, DocumentListComponent, LibrariesComponent],
schemas: [NO_ERRORS_SCHEMA]
});
Expand Down
Loading