mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACS-5627] migrate to standalone components (#3339)
* standalone preview component * remove deprecated routes * remove preview routes * standalone viewer * toggle favorite * edit offline * fix tests * toggle info drawer * toggle join library * toggle favorite library * view node * convert app toolbar module to standalone directives * convert sidenav module to standalone * convert search module to standalone * shared link view * shared files * reduce module files * files component * files component cleanup * cleanup directives module * favorite libraries * favorites component * recent files component * libraries component * cleanup * remove material module barrel * open in app component * cleanup modules * migrate toolbar module to standalone * split page layout module * remove incorrect import * remove incorrect import * rule list * folder rules module * folder rules module * backwards compatibility for ADW * reduce core module usage
This commit is contained in:
@@ -22,17 +22,13 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { DataTableComponent } from '@alfresco/adf-core';
|
||||
import { CustomResourcesService, DocumentListComponent, NodeFavoriteDirective } from '@alfresco/adf-content-services';
|
||||
import { of } from 'rxjs';
|
||||
import { CustomResourcesService } from '@alfresco/adf-content-services';
|
||||
import { BehaviorSubject, of, Subject } 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';
|
||||
import { AppService, ContentApiService } from '@alfresco/aca-shared';
|
||||
|
||||
describe('FavoritesComponent', () => {
|
||||
let fixture: ComponentFixture<FavoritesComponent>;
|
||||
@@ -43,18 +39,16 @@ describe('FavoritesComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, MatDialogModule, MatSnackBarModule],
|
||||
declarations: [DataTableComponent, NodeFavoriteDirective, DocumentListComponent, FavoritesComponent],
|
||||
imports: [AppTestingModule, FavoritesComponent],
|
||||
providers: [
|
||||
{
|
||||
provide: Router,
|
||||
provide: AppService,
|
||||
useValue: {
|
||||
url: 'favorites',
|
||||
navigate: () => {}
|
||||
appNavNarMode$: new BehaviorSubject('expanded'),
|
||||
toggleAppNavBar$: new Subject()
|
||||
}
|
||||
}
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
]
|
||||
});
|
||||
|
||||
const page: any = {
|
||||
@@ -81,6 +75,7 @@ describe('FavoritesComponent', () => {
|
||||
|
||||
contentApi = TestBed.inject(ContentApiService);
|
||||
router = TestBed.inject(Router);
|
||||
spyOnProperty(router, 'url').and.returnValue('favorites');
|
||||
});
|
||||
|
||||
describe('Node navigation', () => {
|
||||
|
@@ -22,13 +22,46 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ContentApiService, PageComponent } from '@alfresco/aca-shared';
|
||||
import {
|
||||
ContentApiService,
|
||||
ContextActionsDirective,
|
||||
InfoDrawerComponent,
|
||||
PageComponent,
|
||||
PageLayoutComponent,
|
||||
PageLayoutContentComponent,
|
||||
PageLayoutHeaderComponent,
|
||||
PaginationDirective,
|
||||
ToolbarActionComponent
|
||||
} from '@alfresco/aca-shared';
|
||||
import { MinimalNodeEntity, MinimalNodeEntryEntity, PathElementEntity, PathInfo } from '@alfresco/js-api';
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { debounceTime, map } from 'rxjs/operators';
|
||||
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||
import { DocumentListPresetRef, ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { BreadcrumbModule, DocumentListModule } from '@alfresco/adf-content-services';
|
||||
import { DataTableModule, PaginationModule, TemplateModule, ToolbarModule } from '@alfresco/adf-core';
|
||||
import { DocumentListDirective } from '../../directives/document-list.directive';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
BreadcrumbModule,
|
||||
ToolbarModule,
|
||||
DocumentListModule,
|
||||
DocumentListDirective,
|
||||
ContextActionsDirective,
|
||||
TemplateModule,
|
||||
DataTableModule,
|
||||
ExtensionsModule,
|
||||
PaginationModule,
|
||||
PaginationDirective,
|
||||
InfoDrawerComponent,
|
||||
ToolbarActionComponent,
|
||||
PageLayoutContentComponent,
|
||||
PageLayoutHeaderComponent,
|
||||
PageLayoutComponent
|
||||
],
|
||||
templateUrl: './favorites.component.html',
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
|
Reference in New Issue
Block a user