mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-19 17:14:45 +00:00
[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:
parent
c4bd16f9aa
commit
f4600b588a
app/src
projects/aca-content/src/lib
aca-content.module.ts
components
common
dl-custom-components/name-column
favorite-libraries
favorites
files
libraries
recent-files
search
search-action-menu
search-input
search-libraries-results
shared-files
sidenav/user-menu
trashcan
view-profile
dialogs/node-template
services
store/effects
contextmenu.effects.spec.tsdownload.effects.spec.tsnode.effects.spec.tsupload.effects.spec.tsviewer.effects.spec.ts
testing
@ -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",
|
||||
|
@ -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);
|
||||
@ -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, {
|
||||
|
@ -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 {}
|
||||
|
@ -1,36 +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 { CommonModule } from '@angular/common';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
import { LoginComponent } from './login.component';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, CoreModule.forChild(), TranslateModule.forChild()],
|
||||
exports: [LoginComponent],
|
||||
declarations: [LoginComponent]
|
||||
})
|
||||
export class AppLoginModule {}
|
@ -1,45 +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 { MatMenuModule } from '@angular/material/menu';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatDialogModule, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
|
||||
@NgModule({
|
||||
imports: [MatMenuModule, MatIconModule, MatButtonModule, MatDialogModule, MatInputModule, MatSnackBarModule, MatProgressBarModule, MatCardModule],
|
||||
exports: [MatMenuModule, MatIconModule, MatButtonModule, MatDialogModule, MatInputModule, MatSnackBarModule, MatProgressBarModule, MatCardModule],
|
||||
providers: [
|
||||
{
|
||||
provide: MAT_DIALOG_DEFAULT_OPTIONS,
|
||||
useValue: { closeOnNavigation: true, hasBackdrop: true, autoFocus: true }
|
||||
}
|
||||
]
|
||||
})
|
||||
export class MaterialModule {}
|
@ -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';
|
||||
@ -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';
|
||||
@ -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: [
|
||||
@ -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,
|
||||
@ -132,7 +133,6 @@ import { ContextMenuComponent } from './components/context-menu/context-menu.com
|
||||
FavoritesComponent,
|
||||
RecentFilesComponent,
|
||||
SharedFilesComponent,
|
||||
CreateFromTemplateDialogComponent,
|
||||
HomeComponent,
|
||||
UploadFilesDialogComponent
|
||||
],
|
||||
|
@ -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,
|
||||
|
@ -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', () => {
|
||||
@ -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]
|
||||
});
|
||||
|
||||
|
@ -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';
|
||||
@ -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>;
|
||||
@ -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]
|
||||
});
|
||||
|
@ -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>;
|
||||
@ -41,7 +43,7 @@ describe('FavoritesComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, AppConfigModule],
|
||||
imports: [AppTestingModule, MatDialogModule, MatSnackBarModule],
|
||||
declarations: [DataTableComponent, NodeFavoriteDirective, DocumentListComponent, FavoritesComponent],
|
||||
providers: [
|
||||
{
|
||||
|
@ -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,
|
||||
@ -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: [
|
||||
{
|
||||
|
@ -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>;
|
||||
@ -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]
|
||||
});
|
||||
|
@ -24,13 +24,15 @@
|
||||
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { DataTableComponent, AppConfigModule } from '@alfresco/adf-core';
|
||||
import { DataTableComponent } from '@alfresco/adf-core';
|
||||
import { CustomResourcesService, DocumentListComponent, NodeFavoriteDirective } from '@alfresco/adf-content-services';
|
||||
import { RecentFilesComponent } from './recent-files.component';
|
||||
import { AppTestingModule } from '../../testing/app-testing.module';
|
||||
import { Router } from '@angular/router';
|
||||
import { NodePaging, SearchApi } from '@alfresco/js-api';
|
||||
import { of } from 'rxjs';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
|
||||
describe('RecentFilesComponent', () => {
|
||||
let fixture: ComponentFixture<RecentFilesComponent>;
|
||||
@ -40,7 +42,7 @@ describe('RecentFilesComponent', () => {
|
||||
const searchApi = jasmine.createSpyObj('SearchApi', ['search']);
|
||||
|
||||
const testBed = TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, AppConfigModule],
|
||||
imports: [AppTestingModule, MatDialogModule, MatSnackBarModule],
|
||||
declarations: [DataTableComponent, NodeFavoriteDirective, DocumentListComponent, RecentFilesComponent],
|
||||
providers: [
|
||||
{ provide: SearchApi, useValue: searchApi },
|
||||
|
@ -27,6 +27,7 @@ import { SearchSortingDefinition } from '@alfresco/adf-content-services/lib/sear
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { SearchActionMenuComponent } from './search-action-menu.component';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
|
||||
const mockSortingData: SearchSortingDefinition[] = [
|
||||
{
|
||||
@ -52,7 +53,7 @@ describe('SearchActionMenuComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule],
|
||||
imports: [AppTestingModule, MatMenuModule],
|
||||
declarations: [SearchActionMenuComponent],
|
||||
providers: [SearchQueryBuilderService]
|
||||
});
|
||||
|
@ -33,6 +33,8 @@ import { map } from 'rxjs/operators';
|
||||
import { SearchQueryBuilderService } from '@alfresco/adf-content-services';
|
||||
import { SearchNavigationService } from '../search-navigation.service';
|
||||
import { BehaviorSubject, Subject } from 'rxjs';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
|
||||
describe('SearchInputComponent', () => {
|
||||
let fixture: ComponentFixture<SearchInputComponent>;
|
||||
@ -47,7 +49,7 @@ describe('SearchInputComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule],
|
||||
imports: [AppTestingModule, MatSnackBarModule, MatMenuModule],
|
||||
declarations: [SearchInputComponent],
|
||||
providers: [
|
||||
{
|
||||
|
@ -24,13 +24,15 @@
|
||||
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { AppConfigModule, DataTableComponent } from '@alfresco/adf-core';
|
||||
import { DataTableComponent } from '@alfresco/adf-core';
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { SearchLibrariesResultsComponent } from './search-libraries-results.component';
|
||||
import { SearchLibrariesQueryBuilderService } from './search-libraries-query-builder.service';
|
||||
import { DocumentListComponent } from '@alfresco/adf-content-services';
|
||||
import { BehaviorSubject, Subject } from 'rxjs';
|
||||
import { AppService } from '@alfresco/aca-shared';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
|
||||
describe('SearchLibrariesResultsComponent', () => {
|
||||
let component: SearchLibrariesResultsComponent;
|
||||
@ -44,7 +46,7 @@ describe('SearchLibrariesResultsComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, AppConfigModule],
|
||||
imports: [AppTestingModule, MatDialogModule, MatSnackBarModule],
|
||||
declarations: [DataTableComponent, DocumentListComponent, SearchLibrariesResultsComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
providers: [
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { DataTableComponent, AppConfigModule } from '@alfresco/adf-core';
|
||||
import { DataTableComponent } from '@alfresco/adf-core';
|
||||
import { CustomResourcesService, DocumentListComponent, NodeFavoriteDirective } from '@alfresco/adf-content-services';
|
||||
import { SharedFilesComponent } from './shared-files.component';
|
||||
import { AppTestingModule } from '../../testing/app-testing.module';
|
||||
@ -32,6 +32,8 @@ import { Router } from '@angular/router';
|
||||
import { of } from 'rxjs';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { SharedLinkPaging } from '@alfresco/js-api';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
|
||||
describe('SharedFilesComponent', () => {
|
||||
let fixture: ComponentFixture<SharedFilesComponent>;
|
||||
@ -39,7 +41,7 @@ describe('SharedFilesComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, AppConfigModule],
|
||||
imports: [AppTestingModule, MatDialogModule, MatSnackBarModule],
|
||||
declarations: [DataTableComponent, NodeFavoriteDirective, DocumentListComponent, SharedFilesComponent],
|
||||
providers: [
|
||||
{
|
||||
|
@ -29,6 +29,7 @@ import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { UserMenuComponent } from './user-menu.component';
|
||||
import { of } from 'rxjs';
|
||||
import { SharedToolbarModule } from '@alfresco/aca-shared';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
|
||||
describe('UserMenuComponent', () => {
|
||||
let component: UserMenuComponent;
|
||||
@ -107,7 +108,7 @@ describe('UserMenuComponent', () => {
|
||||
};
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, SharedToolbarModule],
|
||||
imports: [AppTestingModule, SharedToolbarModule, MatMenuModule],
|
||||
declarations: [UserMenuComponent],
|
||||
providers: [
|
||||
{ provide: AuthenticationService, useValue: authServiceStub },
|
||||
|
@ -22,10 +22,8 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { AlfrescoApiService, DataTableComponent, AppConfigModule } from '@alfresco/adf-core';
|
||||
import { DocumentListComponent, NodeFavoriteDirective } from '@alfresco/adf-content-services';
|
||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
||||
import { TrashcanComponent } from './trashcan.component';
|
||||
import { AppTestingModule } from '../../testing/app-testing.module';
|
||||
|
||||
@ -36,9 +34,7 @@ describe('TrashcanComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, AppConfigModule],
|
||||
declarations: [DataTableComponent, NodeFavoriteDirective, DocumentListComponent, TrashcanComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
imports: [AppTestingModule, TrashcanComponent]
|
||||
});
|
||||
|
||||
fixture = TestBed.createComponent(TrashcanComponent);
|
||||
|
@ -23,11 +23,31 @@
|
||||
*/
|
||||
|
||||
import { getUserProfile } from '@alfresco/aca-shared/store';
|
||||
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||
import { DocumentListPresetRef, ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { PageComponent } from '@alfresco/aca-shared';
|
||||
import { PageComponent, PageLayoutModule, SharedToolbarModule } from '@alfresco/aca-shared';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { BreadcrumbModule, DocumentListModule } from '@alfresco/adf-content-services';
|
||||
import { DataTableModule, PaginationModule, TemplateModule, ToolbarModule } from '@alfresco/adf-core';
|
||||
import { DirectivesModule } from '../../directives/directives.module';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
TranslateModule,
|
||||
PageLayoutModule,
|
||||
BreadcrumbModule,
|
||||
ToolbarModule,
|
||||
SharedToolbarModule,
|
||||
DocumentListModule,
|
||||
TemplateModule,
|
||||
DirectivesModule,
|
||||
PaginationModule,
|
||||
DataTableModule,
|
||||
ExtensionsModule
|
||||
],
|
||||
templateUrl: './trashcan.component.html'
|
||||
})
|
||||
export class TrashcanComponent extends PageComponent implements OnInit {
|
||||
|
@ -1,52 +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 { CommonModule } from '@angular/common';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
import { TrashcanComponent } from './trashcan.component';
|
||||
import { ContentModule } from '@alfresco/adf-content-services';
|
||||
import { AppToolbarModule } from '../toolbar/toolbar.module';
|
||||
import { DirectivesModule } from '../../directives/directives.module';
|
||||
import { AppSearchInputModule } from '../search/search-input.module';
|
||||
import { PageLayoutModule } from '@alfresco/aca-shared';
|
||||
import { ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { ContextMenuComponent } from '../context-menu/context-menu.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
CoreModule.forChild(),
|
||||
ContentModule.forChild(),
|
||||
DirectivesModule,
|
||||
AppToolbarModule,
|
||||
ContextMenuComponent,
|
||||
PageLayoutModule,
|
||||
AppSearchInputModule,
|
||||
ExtensionsModule
|
||||
],
|
||||
declarations: [TrashcanComponent],
|
||||
exports: [TrashcanComponent]
|
||||
})
|
||||
export class AppTrashcanModule {}
|
@ -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,
|
||||
|
@ -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'],
|
||||
|
@ -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 {}
|
@ -25,8 +25,8 @@
|
||||
import { CreateFromTemplateDialogComponent } from './create-from-template.dialog';
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { AppTestingModule } from '../../testing/app-testing.module';
|
||||
import { CoreModule, TranslationMock } from '@alfresco/adf-core';
|
||||
import { MatDialogModule, MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { TranslationMock } from '@alfresco/adf-core';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { CreateFromTemplate } from '@alfresco/aca-shared/store';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
@ -51,8 +51,8 @@ describe('CreateFileFromTemplateDialogComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreModule.forRoot(), AppTestingModule, MatDialogModule],
|
||||
declarations: [CreateFromTemplateDialogComponent],
|
||||
imports: [AppTestingModule, CreateFromTemplateDialogComponent],
|
||||
declarations: [],
|
||||
providers: [
|
||||
{
|
||||
provide: MatDialogRef,
|
||||
|
@ -23,14 +23,21 @@
|
||||
*/
|
||||
|
||||
import { Component, ViewEncapsulation, Inject, OnInit } from '@angular/core';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators, UntypedFormControl, ValidationErrors } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators, UntypedFormControl, ValidationErrors, ReactiveFormsModule } from '@angular/forms';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { AppStore, CreateFromTemplate } from '@alfresco/aca-shared/store';
|
||||
import { TranslationService } from '@alfresco/adf-core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslateModule, MatDialogModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule, MatButtonModule],
|
||||
templateUrl: './create-from-template.dialog.html',
|
||||
styleUrls: ['./create-from-template.dialog.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
|
@ -53,8 +53,8 @@ import { Store } from '@ngrx/store';
|
||||
import { ContentManagementService } from './content-management.service';
|
||||
import { NodeActionsService } from './node-actions.service';
|
||||
import { TranslationService, NotificationService } from '@alfresco/adf-core';
|
||||
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
||||
import { MatSnackBarRef, SimpleSnackBar } from '@angular/material/snack-bar';
|
||||
import { MatDialog, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
|
||||
import { MatSnackBarModule, MatSnackBarRef, SimpleSnackBar } from '@angular/material/snack-bar';
|
||||
import { NodeEntry, Node, VersionPaging, MinimalNodeEntity } from '@alfresco/js-api';
|
||||
import {
|
||||
NewVersionUploaderDataAction,
|
||||
@ -81,7 +81,7 @@ describe('ContentManagementService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, EffectsModule.forRoot([NodeEffects])]
|
||||
imports: [AppTestingModule, EffectsModule.forRoot([NodeEffects]), MatDialogModule, MatSnackBarModule]
|
||||
});
|
||||
|
||||
contentApi = TestBed.inject(ContentApiService);
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
||||
import { MatDialog, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
|
||||
import { of, throwError, Subject, Observable } from 'rxjs';
|
||||
import { AlfrescoApiService, TranslationService } from '@alfresco/adf-core';
|
||||
import { DocumentListService, NodeAction } from '@alfresco/adf-content-services';
|
||||
@ -96,7 +96,7 @@ describe('NodeActionsService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule]
|
||||
imports: [AppTestingModule, MatDialogModule]
|
||||
});
|
||||
|
||||
spyOnSuccess = jasmine.createSpy('spyOnSuccess');
|
||||
|
@ -28,7 +28,7 @@ import { AppStore, SnackbarErrorAction } from '@alfresco/aca-shared/store';
|
||||
import { TemplateEffects } from '../store/effects/template.effects';
|
||||
import { AppTestingModule } from '../testing/app-testing.module';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
|
||||
import { NodeTemplateService } from './node-template.service';
|
||||
import { ResultSetPaging } from '@alfresco/js-api';
|
||||
|
||||
@ -47,7 +47,7 @@ describe('NodeTemplateService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, EffectsModule.forRoot([TemplateEffects])],
|
||||
imports: [AppTestingModule, EffectsModule.forRoot([TemplateEffects]), MatDialogModule],
|
||||
providers: [NodeTemplateService]
|
||||
});
|
||||
|
||||
|
@ -29,7 +29,7 @@ import { EffectsModule } from '@ngrx/effects';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { ContextMenu } from '@alfresco/aca-shared/store';
|
||||
import { ContextMenuService } from '../../components/context-menu/context-menu.service';
|
||||
import { OverlayRef } from '@angular/cdk/overlay';
|
||||
import { OverlayModule, OverlayRef } from '@angular/cdk/overlay';
|
||||
import { ContextMenuOverlayRef } from '../../components/context-menu/context-menu-overlay';
|
||||
|
||||
describe('ContextMenuEffects', () => {
|
||||
@ -39,7 +39,7 @@ describe('ContextMenuEffects', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, EffectsModule.forRoot([ContextMenuEffects])],
|
||||
imports: [AppTestingModule, EffectsModule.forRoot([ContextMenuEffects]), OverlayModule],
|
||||
providers: [ContextMenuService]
|
||||
});
|
||||
|
||||
|
@ -27,7 +27,7 @@ import { AppTestingModule } from '../../testing/app-testing.module';
|
||||
import { EffectsModule } from '@ngrx/effects';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { BehaviorSubject, Subject } from 'rxjs';
|
||||
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
||||
import { MatDialog, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
|
||||
import { DownloadNodesAction } from '@alfresco/aca-shared/store';
|
||||
import { SelectionState } from '@alfresco/adf-extensions';
|
||||
import { VersionEntry } from '@alfresco/js-api';
|
||||
@ -38,7 +38,7 @@ describe('DownloadEffects', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, EffectsModule.forRoot([DownloadEffects])]
|
||||
imports: [AppTestingModule, EffectsModule.forRoot([DownloadEffects]), MatDialogModule]
|
||||
});
|
||||
store = TestBed.inject(Store);
|
||||
});
|
||||
|
@ -53,6 +53,8 @@ import { RenditionService } from '@alfresco/adf-content-services';
|
||||
import { ViewerEffects } from './viewer.effects';
|
||||
import { Router } from '@angular/router';
|
||||
import { of } from 'rxjs';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
|
||||
describe('NodeEffects', () => {
|
||||
let store: Store<any>;
|
||||
@ -63,7 +65,7 @@ describe('NodeEffects', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, SharedStoreModule, EffectsModule.forRoot([NodeEffects, ViewerEffects])],
|
||||
imports: [AppTestingModule, SharedStoreModule, EffectsModule.forRoot([NodeEffects, ViewerEffects]), MatDialogModule, MatSnackBarModule],
|
||||
providers: [RenditionService]
|
||||
});
|
||||
|
||||
|
@ -31,6 +31,8 @@ import { NgZone } from '@angular/core';
|
||||
import { UploadService, FileUploadCompleteEvent, FileModel } from '@alfresco/adf-content-services';
|
||||
import { UnlockWriteAction, UploadFilesAction, UploadFileVersionAction, UploadFolderAction } from '@alfresco/aca-shared/store';
|
||||
import { ContentManagementService } from '../../services/content-management.service';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
|
||||
describe('UploadEffects', () => {
|
||||
let store: Store<any>;
|
||||
@ -41,7 +43,7 @@ describe('UploadEffects', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, EffectsModule.forRoot([UploadEffects])]
|
||||
imports: [AppTestingModule, EffectsModule.forRoot([UploadEffects]), MatDialogModule, MatSnackBarModule]
|
||||
});
|
||||
|
||||
zone = TestBed.inject(NgZone);
|
||||
|
@ -29,6 +29,7 @@ import { EffectsModule } from '@ngrx/effects';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { Router } from '@angular/router';
|
||||
import { ViewFileAction, ViewNodeAction, SetSelectedNodesAction, SetCurrentFolderAction } from '@alfresco/aca-shared/store';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
|
||||
describe('ViewerEffects', () => {
|
||||
let store: Store<any>;
|
||||
@ -36,7 +37,7 @@ describe('ViewerEffects', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, EffectsModule.forRoot([ViewerEffects])]
|
||||
imports: [AppTestingModule, EffectsModule.forRoot([ViewerEffects]), MatDialogModule]
|
||||
});
|
||||
|
||||
store = TestBed.inject(Store);
|
||||
|
@ -31,27 +31,27 @@ import {
|
||||
AuthenticationService,
|
||||
AlfrescoApiService,
|
||||
PipeModule,
|
||||
AlfrescoApiServiceMock
|
||||
AlfrescoApiServiceMock,
|
||||
PageTitleService
|
||||
} from '@alfresco/adf-core';
|
||||
import { DiscoveryApiService } from '@alfresco/adf-content-services';
|
||||
import { DiscoveryApiService, SearchQueryBuilderService } from '@alfresco/adf-content-services';
|
||||
import { RepositoryInfo } from '@alfresco/js-api';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { StoreModule } from '@ngrx/store';
|
||||
import { appReducer } from '../store/reducers/app.reducer';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { EffectsModule } from '@ngrx/effects';
|
||||
import { MaterialModule } from '../material.module';
|
||||
import { INITIAL_STATE } from '../store/initial-state';
|
||||
import { BehaviorSubject, Observable, of } from 'rxjs';
|
||||
import { BehaviorSubject, Observable, Subject, of } from 'rxjs';
|
||||
import { ContentManagementService } from '../services/content-management.service';
|
||||
import { DocumentBasePageService } from '@alfresco/aca-shared';
|
||||
import { STORE_INITIAL_APP_DATA } from '@alfresco/aca-shared/store';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
HttpClientModule,
|
||||
RouterTestingModule,
|
||||
MaterialModule,
|
||||
TranslateModule.forRoot(),
|
||||
StoreModule.forRoot(
|
||||
{ app: appReducer },
|
||||
@ -66,8 +66,9 @@ import { DocumentBasePageService } from '@alfresco/aca-shared';
|
||||
EffectsModule.forRoot([]),
|
||||
PipeModule
|
||||
],
|
||||
exports: [RouterTestingModule, MaterialModule, PipeModule, TranslateModule],
|
||||
exports: [RouterTestingModule, PipeModule, TranslateModule],
|
||||
providers: [
|
||||
SearchQueryBuilderService,
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||
{ provide: TranslationService, useClass: TranslationMock },
|
||||
{ provide: DocumentBasePageService, useExisting: ContentManagementService },
|
||||
@ -85,8 +86,19 @@ import { DocumentBasePageService } from '@alfresco/aca-shared';
|
||||
getRedirect: (): string | null => null,
|
||||
setRedirect() {},
|
||||
isOauth: (): boolean => false,
|
||||
isOAuthWithoutSilentLogin: (): boolean => false
|
||||
isOAuthWithoutSilentLogin: (): boolean => false,
|
||||
onLogin: new Subject<any>(),
|
||||
onLogout: new Subject<any>(),
|
||||
isLoggedIn: () => true
|
||||
}
|
||||
},
|
||||
{
|
||||
provide: PageTitleService,
|
||||
useValue: {}
|
||||
},
|
||||
{
|
||||
provide: STORE_INITIAL_APP_DATA,
|
||||
useValue: {}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user