mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-5308] cleanup content common module and move to standalone components (#3234)
* language picker * location link * logout component * logout: fix tests * toggle shared component * user info component * cleanup common module * migrate generic error to standalone * thumbnail column component * name column component * tags column component * locked by component * cleanup module dependencies * comments tab component * info drawer and details * cleanup infodrawer module * remove useless test * reduce useless imports * info drawer module * context menu component
This commit is contained in:
@@ -23,8 +23,12 @@
|
||||
*/
|
||||
|
||||
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input } from '@angular/core';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [MatIconModule, TranslateModule],
|
||||
selector: 'aca-generic-error',
|
||||
templateUrl: './generic-error.component.html',
|
||||
styleUrls: ['./generic-error.component.scss'],
|
||||
|
@@ -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 { GenericErrorComponent } from './generic-error.component';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, MatIconModule, TranslateModule.forChild()],
|
||||
declarations: [GenericErrorComponent],
|
||||
exports: [GenericErrorComponent]
|
||||
})
|
||||
export class GenericErrorModule {}
|
@@ -60,8 +60,7 @@ describe('InfoDrawerComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [LibTestingModule, SharedToolbarModule],
|
||||
declarations: [InfoDrawerComponent],
|
||||
imports: [LibTestingModule, SharedToolbarModule, InfoDrawerComponent],
|
||||
providers: [
|
||||
{ provide: AppExtensionService, useValue: extensionServiceMock },
|
||||
{ provide: Store, useValue: storeMock }
|
||||
|
@@ -24,7 +24,7 @@
|
||||
|
||||
import { Component, HostListener, Input, OnChanges, OnDestroy, OnInit } from '@angular/core';
|
||||
import { MinimalNodeEntity, MinimalNodeEntryEntity, SiteEntry } from '@alfresco/js-api';
|
||||
import { ContentActionRef, SidebarTabRef } from '@alfresco/adf-extensions';
|
||||
import { ContentActionRef, ExtensionsModule, SidebarTabRef } from '@alfresco/adf-extensions';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { SetInfoDrawerStateAction, ToggleInfoDrawerAction, infoDrawerPreview } from '@alfresco/aca-shared/store';
|
||||
import { AppExtensionService } from '../../services/app.extension.service';
|
||||
@@ -32,7 +32,14 @@ import { ContentApiService } from '../../services/content-api.service';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { Subject } from 'rxjs';
|
||||
import { ThemePalette } from '@angular/material/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { InfoDrawerModule, ToolbarModule } from '@alfresco/adf-core';
|
||||
import { SharedToolbarModule } from '../tool-bar/shared-toolbar.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslateModule, MatProgressBarModule, InfoDrawerModule, SharedToolbarModule, ExtensionsModule, ToolbarModule],
|
||||
selector: 'aca-info-drawer',
|
||||
templateUrl: './info-drawer.component.html'
|
||||
})
|
||||
|
@@ -1,40 +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 { InfoDrawerComponent } from './info-drawer.component';
|
||||
import { InfoDrawerModule, ToolbarModule } from '@alfresco/adf-core';
|
||||
import { ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { SharedToolbarModule } from '../tool-bar/shared-toolbar.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { A11yModule } from '@angular/cdk/a11y';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, InfoDrawerModule, MatProgressBarModule, ExtensionsModule, ToolbarModule, SharedToolbarModule, TranslateModule, A11yModule],
|
||||
declarations: [InfoDrawerComponent],
|
||||
exports: [InfoDrawerComponent]
|
||||
})
|
||||
export class SharedInfoDrawerModule {}
|
@@ -24,8 +24,12 @@
|
||||
|
||||
import { Component, Input, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [TranslateModule, MatIconModule],
|
||||
selector: 'aca-locked-by',
|
||||
template: `
|
||||
<mat-icon class="locked_by--icon">lock</mat-icon>
|
||||
|
@@ -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 { LockedByComponent } from './locked-by.component';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, MatIconModule, TranslateModule.forChild()],
|
||||
declarations: [LockedByComponent],
|
||||
exports: [LockedByComponent]
|
||||
})
|
||||
export class LockedByModule {}
|
@@ -42,7 +42,7 @@ describe('OpenInAppComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [LibTestingModule, SharedModule.forRoot(), MatIconTestingModule],
|
||||
imports: [LibTestingModule, SharedModule, MatIconTestingModule],
|
||||
providers: [
|
||||
provideMockStore({ initialState }),
|
||||
{ provide: MAT_DIALOG_DATA, useValue: { redirectUrl: 'mockRedirectUrl', appStoreUrl: 'mockAppStoreUrl' } },
|
||||
|
@@ -22,10 +22,7 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ModuleWithProviders, NgModule } from '@angular/core';
|
||||
import { ContentApiService } from './services/content-api.service';
|
||||
import { NodePermissionService } from './services/node-permission.service';
|
||||
import { AppService } from './services/app.service';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { ContextActionsModule } from './directives/contextmenu/contextmenu.module';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
@@ -36,11 +33,4 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
imports: [ContextActionsModule, MatButtonModule, MatIconModule, MatDialogModule, TranslateModule],
|
||||
exports: [ContextActionsModule, MatButtonModule, MatIconModule, MatDialogModule, TranslateModule]
|
||||
})
|
||||
export class SharedModule {
|
||||
static forRoot(): ModuleWithProviders<SharedModule> {
|
||||
return {
|
||||
ngModule: SharedModule,
|
||||
providers: [ContentApiService, NodePermissionService, AppService]
|
||||
};
|
||||
}
|
||||
}
|
||||
export class SharedModule {}
|
||||
|
@@ -29,16 +29,13 @@ export * from './lib/components/page-layout/page-layout-header.component';
|
||||
export * from './lib/components/page-layout/page-layout.component';
|
||||
export * from './lib/components/page-layout/page-layout.module';
|
||||
export * from './lib/components/locked-by/locked-by.component';
|
||||
export * from './lib/components/locked-by/locked-by.module';
|
||||
export * from './lib/components/generic-error/generic-error.component';
|
||||
export * from './lib/components/generic-error/generic-error.module';
|
||||
export * from './lib/components/tool-bar/shared-toolbar.module';
|
||||
export * from './lib/components/tool-bar/toolbar-action/toolbar-action.component';
|
||||
export * from './lib/components/tool-bar/toolbar-button/toolbar-button.component';
|
||||
export * from './lib/components/tool-bar/toolbar-menu/toolbar-menu.component';
|
||||
export * from './lib/components/tool-bar/toolbar-menu-item/toolbar-menu-item.component';
|
||||
export * from './lib/components/info-drawer/info-drawer.component';
|
||||
export * from './lib/components/info-drawer/shared-info-drawer.module';
|
||||
export * from './lib/components/document-base-page/document-base-page.component';
|
||||
export * from './lib/components/document-base-page/document-base-page.service';
|
||||
export * from './lib/components/open-in-app/open-in-app.component';
|
||||
|
Reference in New Issue
Block a user