mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-5372] remove old internal plugins (#3257)
* [ACS-5372] remove old internal plugins * remove unused i18n keys
This commit is contained in:
@@ -71,7 +71,6 @@ import { LibraryMetadataTabComponent } from './components/info-drawer/library-me
|
||||
import { MetadataTabComponent } from './components/info-drawer/metadata-tab/metadata-tab.component';
|
||||
import { VersionsTabComponent } from './components/info-drawer/versions-tab/versions-tab.component';
|
||||
import { PreviewComponent } from '@alfresco/aca-preview';
|
||||
import { DocumentDisplayModeComponent } from './components/toolbar/document-display-mode/document-display-mode.component';
|
||||
import { ToggleEditOfflineComponent } from './components/toolbar/toggle-edit-offline/toggle-edit-offline.component';
|
||||
import { ToggleFavoriteLibraryComponent } from './components/toolbar/toggle-favorite-library/toggle-favorite-library.component';
|
||||
import { ToggleFavoriteComponent } from './components/toolbar/toggle-favorite/toggle-favorite.component';
|
||||
@@ -170,7 +169,6 @@ export class ContentServiceExtensionModule {
|
||||
'app.toolbar.toggleFavorite': ToggleFavoriteComponent,
|
||||
'app.toolbar.toggleFavoriteLibrary': ToggleFavoriteLibraryComponent,
|
||||
'app.toolbar.toggleJoinLibrary': ToggleJoinLibraryButtonComponent,
|
||||
'app.toolbar.cardView': DocumentDisplayModeComponent,
|
||||
'app.menu.toggleJoinLibrary': ToggleJoinLibraryMenuComponent,
|
||||
'app.shared-link.toggleSharedLink': ToggleSharedComponent,
|
||||
'app.columns.name': CustomNameColumnComponent,
|
||||
|
@@ -1,63 +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 { DocumentDisplayModeComponent } from './document-display-mode.component';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { of } from 'rxjs';
|
||||
import { provideMockStore } from '@ngrx/store/testing';
|
||||
import { Store } from '@ngrx/store';
|
||||
|
||||
describe('DocumentDisplayModeComponent', () => {
|
||||
let fixture: ComponentFixture<DocumentDisplayModeComponent>;
|
||||
let store: Store;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreModule, AppTestingModule],
|
||||
providers: [provideMockStore()]
|
||||
});
|
||||
|
||||
fixture = TestBed.createComponent(DocumentDisplayModeComponent);
|
||||
store = TestBed.inject(Store);
|
||||
});
|
||||
|
||||
it('should show the list button when list', async () => {
|
||||
spyOn(store, 'select').and.returnValue(of('list'));
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
const displayButton: HTMLButtonElement = fixture.nativeElement.querySelector('#app-document-display-mode-button');
|
||||
expect(displayButton.title).toBe('APP.ACTIONS.LIST_MODE');
|
||||
});
|
||||
|
||||
it('should show the gallery button when gallery', async () => {
|
||||
spyOn(store, 'select').and.returnValue(of('gallery'));
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
const displayButton: HTMLButtonElement = fixture.nativeElement.querySelector('#app-document-display-mode-button');
|
||||
expect(displayButton.title).toBe('APP.ACTIONS.GALLERY_MODE');
|
||||
});
|
||||
});
|
@@ -1,74 +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 { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { Observable, Subject } from 'rxjs';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { AppStore, ToggleDocumentDisplayMode, getDocumentDisplayMode } from '@alfresco/aca-shared/store';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
selector: 'app-document-display-mode',
|
||||
template: `
|
||||
<ng-container *ngIf="displayMode$ | async as displayMode">
|
||||
<button
|
||||
id="app-document-display-mode-button"
|
||||
[attr.title]="displayModeTitle | translate"
|
||||
[attr.aria-label]="displayModeTitle | translate"
|
||||
mat-icon-button
|
||||
color="primary"
|
||||
(click)="onClick()"
|
||||
>
|
||||
<mat-icon *ngIf="displayMode === 'list'">view_comfy</mat-icon>
|
||||
<mat-icon *ngIf="displayMode === 'gallery'">list</mat-icon>
|
||||
</button>
|
||||
</ng-container>
|
||||
`,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
host: { class: 'app-document-display-mode' }
|
||||
})
|
||||
export class DocumentDisplayModeComponent implements OnInit, OnDestroy {
|
||||
displayMode$: Observable<string>;
|
||||
displayModeTitle: string;
|
||||
|
||||
onDestroy$ = new Subject<void>();
|
||||
|
||||
constructor(private store: Store<AppStore>) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.displayMode$ = this.store.select(getDocumentDisplayMode);
|
||||
this.displayMode$.pipe(takeUntil(this.onDestroy$)).subscribe((displayMode) => {
|
||||
this.displayModeTitle = displayMode === 'list' ? 'APP.ACTIONS.LIST_MODE' : 'APP.ACTIONS.GALLERY_MODE';
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.onDestroy$.next();
|
||||
this.onDestroy$.complete();
|
||||
}
|
||||
|
||||
onClick() {
|
||||
this.store.dispatch(new ToggleDocumentDisplayMode());
|
||||
}
|
||||
}
|
@@ -23,7 +23,6 @@
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { DocumentDisplayModeComponent } from './document-display-mode/document-display-mode.component';
|
||||
import { ToggleFavoriteComponent } from './toggle-favorite/toggle-favorite.component';
|
||||
import { ToggleInfoDrawerComponent } from './toggle-info-drawer/toggle-info-drawer.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
@@ -40,7 +39,6 @@ import { SharedToolbarModule } from '@alfresco/aca-shared';
|
||||
@NgModule({
|
||||
imports: [CommonModule, CoreModule.forChild(), ExtensionsModule, SharedToolbarModule, DirectivesModule],
|
||||
declarations: [
|
||||
DocumentDisplayModeComponent,
|
||||
ToggleFavoriteComponent,
|
||||
ToggleInfoDrawerComponent,
|
||||
ToggleJoinLibraryButtonComponent,
|
||||
@@ -50,7 +48,6 @@ import { SharedToolbarModule } from '@alfresco/aca-shared';
|
||||
ViewNodeComponent
|
||||
],
|
||||
exports: [
|
||||
DocumentDisplayModeComponent,
|
||||
ToggleFavoriteComponent,
|
||||
ToggleInfoDrawerComponent,
|
||||
ToggleJoinLibraryButtonComponent,
|
||||
|
Reference in New Issue
Block a user