mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +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:
@@ -32,7 +32,6 @@ import { InfoDrawerComponent } from './info-drawer.component';
|
||||
import { LibTestingModule } from '../../testing/lib-testing-module';
|
||||
import { AppExtensionService } from '../../services/app.extension.service';
|
||||
import { ContentApiService } from '../../services/content-api.service';
|
||||
import { SharedToolbarModule } from '../tool-bar/shared-toolbar.module';
|
||||
|
||||
describe('InfoDrawerComponent', () => {
|
||||
let fixture: ComponentFixture<InfoDrawerComponent>;
|
||||
@@ -60,7 +59,7 @@ describe('InfoDrawerComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [LibTestingModule, SharedToolbarModule, InfoDrawerComponent],
|
||||
imports: [LibTestingModule, InfoDrawerComponent],
|
||||
providers: [
|
||||
{ provide: AppExtensionService, useValue: extensionServiceMock },
|
||||
{ provide: Store, useValue: storeMock }
|
||||
|
@@ -35,12 +35,22 @@ 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';
|
||||
import { A11yModule } from '@angular/cdk/a11y';
|
||||
import { ToolbarActionComponent } from '../tool-bar/toolbar-action/toolbar-action.component';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslateModule, MatProgressBarModule, InfoDrawerModule, SharedToolbarModule, ExtensionsModule, ToolbarModule],
|
||||
imports: [
|
||||
CommonModule,
|
||||
TranslateModule,
|
||||
MatProgressBarModule,
|
||||
InfoDrawerModule,
|
||||
ExtensionsModule,
|
||||
ToolbarModule,
|
||||
A11yModule,
|
||||
ToolbarActionComponent
|
||||
],
|
||||
selector: 'aca-info-drawer',
|
||||
templateUrl: './info-drawer.component.html',
|
||||
encapsulation: ViewEncapsulation.None
|
||||
|
@@ -28,8 +28,6 @@ import { By } from '@angular/platform-browser';
|
||||
import { OpenInAppComponent } from './open-in-app.component';
|
||||
import { initialState, LibTestingModule } from '../../testing/lib-testing-module';
|
||||
import { provideMockStore } from '@ngrx/store/testing';
|
||||
import { MatIconTestingModule } from '@angular/material/icon/testing';
|
||||
import { SharedModule } from '@alfresco/aca-shared';
|
||||
|
||||
describe('OpenInAppComponent', () => {
|
||||
let fixture: ComponentFixture<OpenInAppComponent>;
|
||||
@@ -42,7 +40,7 @@ describe('OpenInAppComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [LibTestingModule, SharedModule, MatIconTestingModule],
|
||||
imports: [LibTestingModule, OpenInAppComponent],
|
||||
providers: [
|
||||
provideMockStore({ initialState }),
|
||||
{ provide: MAT_DIALOG_DATA, useValue: { redirectUrl: 'mockRedirectUrl', appStoreUrl: 'mockAppStoreUrl' } },
|
||||
|
@@ -24,12 +24,19 @@
|
||||
|
||||
import { Component, Inject, ViewEncapsulation } from '@angular/core';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { A11yModule } from '@angular/cdk/a11y';
|
||||
|
||||
export interface OpenInAppDialogOptions {
|
||||
redirectUrl: string;
|
||||
appStoreUrl: string;
|
||||
}
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslateModule, MatButtonModule, MatIconModule, A11yModule],
|
||||
selector: 'aca-open-in-app',
|
||||
templateUrl: './open-in-app.component.html',
|
||||
styleUrls: ['./open-in-app.component.scss'],
|
||||
|
@@ -1,38 +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 { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { OpenInAppComponent } from './open-in-app.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, MatIconModule, TranslateModule, MatButtonModule, BrowserModule],
|
||||
declarations: [OpenInAppComponent],
|
||||
exports: [OpenInAppComponent]
|
||||
})
|
||||
export class OpenInAppModule {}
|
@@ -25,6 +25,7 @@
|
||||
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input, HostBinding } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'aca-page-layout-content',
|
||||
template: `<ng-content></ng-content>`,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
|
@@ -25,6 +25,7 @@
|
||||
import { Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'aca-page-layout-error',
|
||||
template: `<ng-content></ng-content>`,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
|
@@ -25,6 +25,7 @@
|
||||
import { Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'aca-page-layout-header',
|
||||
template: '<ng-content></ng-content>',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
|
@@ -37,7 +37,7 @@ describe('PageLayoutComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PageLayoutComponent],
|
||||
imports: [PageLayoutComponent],
|
||||
providers: [
|
||||
{
|
||||
provide: AppService,
|
||||
|
@@ -26,8 +26,14 @@ import { Component, ViewEncapsulation, Input, OnDestroy } from '@angular/core';
|
||||
import { Observable, Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { AppService } from '../../services/app.service';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslateModule, MatButtonModule, MatIconModule],
|
||||
selector: 'aca-page-layout',
|
||||
templateUrl: './page-layout.component.html',
|
||||
styleUrls: ['./page-layout.component.scss'],
|
||||
|
@@ -27,14 +27,9 @@ import { PageLayoutContentComponent } from './page-layout-content.component';
|
||||
import { PageLayoutErrorComponent } from './page-layout-error.component';
|
||||
import { PageLayoutHeaderComponent } from './page-layout-header.component';
|
||||
import { PageLayoutComponent } from './page-layout.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, MatIconModule, TranslateModule, MatButtonModule],
|
||||
declarations: [PageLayoutContentComponent, PageLayoutErrorComponent, PageLayoutHeaderComponent, PageLayoutComponent],
|
||||
imports: [PageLayoutComponent, PageLayoutContentComponent, PageLayoutErrorComponent, PageLayoutHeaderComponent],
|
||||
exports: [PageLayoutContentComponent, PageLayoutErrorComponent, PageLayoutHeaderComponent, PageLayoutComponent]
|
||||
})
|
||||
export class PageLayoutModule {}
|
||||
|
@@ -24,13 +24,10 @@
|
||||
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ToolbarActionComponent } from './toolbar-action.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { ToolbarButtonType } from '../toolbar-button/toolbar-button.component';
|
||||
import { ChangeDetectorRef } from '@angular/core';
|
||||
import { ContentActionType } from '@alfresco/adf-extensions';
|
||||
import { IconModule } from '@alfresco/adf-core';
|
||||
import { LibTestingModule } from '@alfresco/aca-shared';
|
||||
|
||||
describe('ToolbarActionComponent', () => {
|
||||
let fixture: ComponentFixture<ToolbarActionComponent>;
|
||||
@@ -39,9 +36,8 @@ describe('ToolbarActionComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CommonModule, HttpClientModule, TranslateModule.forRoot(), IconModule],
|
||||
providers: [{ provide: ChangeDetectorRef, useValue: { markForCheck() {} } }],
|
||||
declarations: [ToolbarActionComponent]
|
||||
imports: [LibTestingModule, ToolbarActionComponent],
|
||||
providers: [{ provide: ChangeDetectorRef, useValue: { markForCheck() {} } }]
|
||||
});
|
||||
|
||||
fixture = TestBed.createComponent(ToolbarActionComponent);
|
||||
|
@@ -23,11 +23,16 @@
|
||||
*/
|
||||
|
||||
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input, DoCheck, ChangeDetectorRef } from '@angular/core';
|
||||
import { ContentActionRef } from '@alfresco/adf-extensions';
|
||||
import { ToolbarButtonType } from '../toolbar-button/toolbar-button.component';
|
||||
import { ContentActionRef, ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { ToolbarButtonComponent, ToolbarButtonType } from '../toolbar-button/toolbar-button.component';
|
||||
import { ThemePalette } from '@angular/material/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ToolbarModule } from '@alfresco/adf-core';
|
||||
import { ToolbarMenuComponent } from '../toolbar-menu/toolbar-menu.component';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, ExtensionsModule, ToolbarModule, ToolbarButtonComponent, ToolbarMenuComponent],
|
||||
selector: 'aca-toolbar-action',
|
||||
templateUrl: './toolbar-action.component.html',
|
||||
styleUrls: ['./toolbar-action.component.scss'],
|
||||
|
@@ -24,15 +24,11 @@
|
||||
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ToolbarButtonComponent, ToolbarButtonType } from './toolbar-button.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { IconModule, TranslationMock, TranslationService } from '@alfresco/adf-core';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { of } from 'rxjs';
|
||||
import { AppExtensionService } from '../../../services/app.extension.service';
|
||||
import { ContentActionType } from '@alfresco/adf-extensions';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { LibTestingModule } from '@alfresco/aca-shared';
|
||||
|
||||
describe('ToolbarButtonComponent', () => {
|
||||
let fixture: ComponentFixture<ToolbarButtonComponent>;
|
||||
@@ -41,10 +37,8 @@ describe('ToolbarButtonComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CommonModule, HttpClientModule, TranslateModule.forRoot(), IconModule, MatButtonModule],
|
||||
declarations: [ToolbarButtonComponent],
|
||||
imports: [LibTestingModule, ToolbarButtonComponent],
|
||||
providers: [
|
||||
{ provide: TranslationService, useClass: TranslationMock },
|
||||
{ provide: AppExtensionService, useValue: { runActionById() {} } },
|
||||
{
|
||||
provide: Store,
|
||||
|
@@ -26,6 +26,11 @@ import { Component, Input, ViewEncapsulation } from '@angular/core';
|
||||
import { ContentActionRef } from '@alfresco/adf-extensions';
|
||||
import { AppExtensionService } from '../../../services/app.extension.service';
|
||||
import { ThemePalette } from '@angular/material/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { IconModule } from '@alfresco/adf-core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { ToolbarMenuItemComponent } from '../toolbar-menu-item/toolbar-menu-item.component';
|
||||
|
||||
export enum ToolbarButtonType {
|
||||
ICON_BUTTON = 'icon-button',
|
||||
@@ -35,6 +40,8 @@ export enum ToolbarButtonType {
|
||||
}
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslateModule, MatButtonModule, IconModule, ToolbarMenuItemComponent],
|
||||
selector: 'app-toolbar-button',
|
||||
templateUrl: './toolbar-button.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
|
@@ -25,14 +25,10 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ToolbarMenuItemComponent } from './toolbar-menu-item.component';
|
||||
import { AppExtensionService } from '../../../services/app.extension.service';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { IconModule, TranslationMock, TranslationService } from '@alfresco/adf-core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { of } from 'rxjs';
|
||||
import { ContentActionRef, ContentActionType } from '@alfresco/adf-extensions';
|
||||
import { LibTestingModule } from '@alfresco/aca-shared';
|
||||
|
||||
describe('ToolbarMenuItemComponent', () => {
|
||||
let fixture: ComponentFixture<ToolbarMenuItemComponent>;
|
||||
@@ -41,10 +37,8 @@ describe('ToolbarMenuItemComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CommonModule, HttpClientModule, TranslateModule.forRoot(), IconModule, MatButtonModule],
|
||||
declarations: [ToolbarMenuItemComponent],
|
||||
imports: [LibTestingModule, ToolbarMenuItemComponent],
|
||||
providers: [
|
||||
{ provide: TranslationService, useClass: TranslationMock },
|
||||
{ provide: AppExtensionService, useValue: { runActionById() {} } },
|
||||
{
|
||||
provide: Store,
|
||||
|
@@ -23,11 +23,17 @@
|
||||
*/
|
||||
|
||||
import { Component, Input, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
import { ContentActionRef } from '@alfresco/adf-extensions';
|
||||
import { ContentActionRef, ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { AppExtensionService } from '../../../services/app.extension.service';
|
||||
import { MatMenuItem } from '@angular/material/menu';
|
||||
import { MatMenuItem, MatMenuModule } from '@angular/material/menu';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { IconModule } from '@alfresco/adf-core';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslateModule, IconModule, MatMenuModule, MatDividerModule, ExtensionsModule],
|
||||
selector: 'app-toolbar-menu-item',
|
||||
templateUrl: './toolbar-menu-item.component.html',
|
||||
styles: [
|
||||
|
@@ -24,11 +24,9 @@
|
||||
|
||||
import { ToolbarMenuComponent } from './toolbar-menu.component';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MaterialModule } from '@alfresco/adf-core';
|
||||
import { OverlayModule } from '@angular/cdk/overlay';
|
||||
import { TranslateModule, TranslateLoader, TranslateFakeLoader } from '@ngx-translate/core';
|
||||
import { ContentActionRef, ContentActionType } from '@alfresco/adf-extensions';
|
||||
import { QueryList } from '@angular/core';
|
||||
import { LibTestingModule } from '@alfresco/aca-shared';
|
||||
|
||||
describe('ToolbarMenuComponent', () => {
|
||||
let fixture: ComponentFixture<ToolbarMenuComponent>;
|
||||
@@ -38,13 +36,7 @@ describe('ToolbarMenuComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
MaterialModule,
|
||||
OverlayModule,
|
||||
TranslateModule.forRoot({
|
||||
loader: { provide: TranslateLoader, useClass: TranslateFakeLoader }
|
||||
})
|
||||
]
|
||||
imports: [LibTestingModule, ToolbarMenuComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(ToolbarMenuComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@@ -23,12 +23,18 @@
|
||||
*/
|
||||
|
||||
import { Component, Input, ViewEncapsulation, HostListener, ViewChild, ViewChildren, QueryList, AfterViewInit, OnInit } from '@angular/core';
|
||||
import { ContentActionRef } from '@alfresco/adf-extensions';
|
||||
import { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
|
||||
import { ContentActionRef, ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { MatMenu, MatMenuItem, MatMenuModule, MatMenuTrigger } from '@angular/material/menu';
|
||||
import { ThemePalette } from '@angular/material/core';
|
||||
import { ToolbarMenuItemComponent } from '../toolbar-menu-item/toolbar-menu-item.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { IconModule } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslateModule, MatButtonModule, MatMenuModule, IconModule, ExtensionsModule, ToolbarMenuItemComponent],
|
||||
selector: 'app-toolbar-menu',
|
||||
templateUrl: './toolbar-menu.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
|
@@ -24,16 +24,24 @@
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ToolbarMenuItemComponent } from './toolbar-menu-item/toolbar-menu-item.component';
|
||||
import { ToolbarMenuComponent } from './toolbar-menu/toolbar-menu.component';
|
||||
import { ToolbarActionComponent } from './toolbar-action/toolbar-action.component';
|
||||
import { ToolbarButtonComponent } from './toolbar-button/toolbar-button.component';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
import { ExtensionsModule } from '@alfresco/adf-extensions';
|
||||
import { ToolbarButtonComponent } from '../components/tool-bar/toolbar-button/toolbar-button.component';
|
||||
import { ToolbarActionComponent } from '../components/tool-bar/toolbar-action/toolbar-action.component';
|
||||
import { ToolbarMenuItemComponent } from '../components/tool-bar/toolbar-menu-item/toolbar-menu-item.component';
|
||||
import { ToolbarMenuComponent } from '../components/tool-bar/toolbar-menu/toolbar-menu.component';
|
||||
|
||||
// @deprecated
|
||||
@NgModule({
|
||||
imports: [CommonModule, CoreModule, ExtensionsModule],
|
||||
declarations: [ToolbarButtonComponent, ToolbarActionComponent, ToolbarMenuItemComponent, ToolbarMenuComponent],
|
||||
imports: [
|
||||
CommonModule,
|
||||
CoreModule,
|
||||
ExtensionsModule,
|
||||
ToolbarButtonComponent,
|
||||
ToolbarActionComponent,
|
||||
ToolbarMenuItemComponent,
|
||||
ToolbarMenuComponent
|
||||
],
|
||||
exports: [ToolbarButtonComponent, ToolbarActionComponent, ToolbarMenuItemComponent, ToolbarMenuComponent]
|
||||
})
|
||||
export class SharedToolbarModule {}
|
@@ -23,14 +23,15 @@
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { ContextActionsModule } from './directives/contextmenu/contextmenu.module';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { ContextActionsDirective } from '../directives/contextmenu/contextmenu.directive';
|
||||
|
||||
// @deprecated
|
||||
@NgModule({
|
||||
imports: [ContextActionsModule, MatButtonModule, MatIconModule, MatDialogModule, TranslateModule],
|
||||
exports: [ContextActionsModule, MatButtonModule, MatIconModule, MatDialogModule, TranslateModule]
|
||||
imports: [MatButtonModule, MatIconModule, MatDialogModule, TranslateModule, ContextActionsDirective],
|
||||
exports: [MatButtonModule, MatIconModule, MatDialogModule, TranslateModule, ContextActionsDirective]
|
||||
})
|
||||
export class SharedModule {}
|
@@ -29,6 +29,7 @@ import { Store } from '@ngrx/store';
|
||||
import { AppStore, ContextMenu } from '@alfresco/aca-shared/store';
|
||||
|
||||
@Directive({
|
||||
standalone: true,
|
||||
selector: '[acaContextActions]',
|
||||
exportAs: 'acaContextActions'
|
||||
})
|
||||
|
@@ -1,35 +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 { ContextActionsDirective } from './contextmenu.directive';
|
||||
|
||||
/**
|
||||
* @deprecated in 1.11.0, use SharedDirectivesModule instead.
|
||||
*/
|
||||
@NgModule({
|
||||
declarations: [ContextActionsDirective],
|
||||
exports: [ContextActionsDirective]
|
||||
})
|
||||
export class ContextActionsModule {}
|
@@ -24,9 +24,8 @@
|
||||
|
||||
import { PaginationDirective } from './pagination.directive';
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { UserPreferencesService, AppConfigService, PaginationComponent, PaginationModel, CoreTestingModule } from '@alfresco/adf-core';
|
||||
import { UserPreferencesService, AppConfigService, PaginationComponent, PaginationModel } from '@alfresco/adf-core';
|
||||
import { initialState, LibTestingModule } from '../testing/lib-testing-module';
|
||||
import { SharedDirectivesModule } from './shared.directives.module';
|
||||
import { provideMockStore } from '@ngrx/store/testing';
|
||||
|
||||
describe('PaginationDirective', () => {
|
||||
@@ -38,7 +37,7 @@ describe('PaginationDirective', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [LibTestingModule, SharedDirectivesModule, CoreTestingModule],
|
||||
imports: [LibTestingModule, PaginationDirective],
|
||||
providers: [provideMockStore({ initialState })]
|
||||
});
|
||||
|
||||
|
@@ -27,6 +27,7 @@ import { PaginationComponent, UserPreferencesService, PaginationModel, AppConfig
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
@Directive({
|
||||
standalone: true,
|
||||
selector: '[acaPagination]'
|
||||
})
|
||||
export class PaginationDirective implements OnInit, OnDestroy {
|
||||
|
@@ -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 { PaginationDirective } from './pagination.directive';
|
||||
import { ContextActionsModule } from './contextmenu/contextmenu.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [ContextActionsModule],
|
||||
declarations: [PaginationDirective],
|
||||
exports: [PaginationDirective, ContextActionsModule]
|
||||
})
|
||||
export class SharedDirectivesModule {}
|
@@ -38,6 +38,8 @@ import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { EffectsModule } from '@ngrx/effects';
|
||||
import { StoreModule } from '@ngrx/store';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MatIconTestingModule } from '@angular/material/icon/testing';
|
||||
import { OverlayModule } from '@angular/cdk/overlay';
|
||||
|
||||
export const initialState = {
|
||||
app: {
|
||||
@@ -77,7 +79,19 @@ export const initialState = {
|
||||
CommonModule,
|
||||
HttpClientModule,
|
||||
RouterTestingModule,
|
||||
MatIconTestingModule,
|
||||
StoreModule,
|
||||
OverlayModule,
|
||||
StoreModule.forRoot(
|
||||
{ app: null },
|
||||
{
|
||||
initialState,
|
||||
runtimeChecks: {
|
||||
strictStateImmutability: false,
|
||||
strictActionImmutability: false
|
||||
}
|
||||
}
|
||||
),
|
||||
EffectsModule.forRoot([]),
|
||||
TranslateModule.forRoot({
|
||||
loader: {
|
||||
|
@@ -30,7 +30,6 @@ 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/generic-error/generic-error.component';
|
||||
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';
|
||||
@@ -39,12 +38,9 @@ export * from './lib/components/info-drawer/info-drawer.component';
|
||||
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';
|
||||
export * from './lib/components/open-in-app/open-in-app.module';
|
||||
|
||||
export * from './lib/directives/contextmenu/contextmenu.directive';
|
||||
export * from './lib/directives/contextmenu/contextmenu.module';
|
||||
export * from './lib/directives/pagination.directive';
|
||||
export * from './lib/directives/shared.directives.module';
|
||||
|
||||
export * from './lib/models/types';
|
||||
export * from './lib/models/viewer.rules';
|
||||
@@ -61,5 +57,7 @@ export * from './lib/services/app-hook.service';
|
||||
export * from './lib/services/aca-file-auto-download.service';
|
||||
|
||||
export * from './lib/utils/node.utils';
|
||||
export * from './lib/shared.module';
|
||||
export * from './lib/testing/lib-testing-module';
|
||||
|
||||
export * from './lib/deprecated/shared.module';
|
||||
export * from './lib/deprecated/shared-toolbar.module';
|
||||
|
Reference in New Issue
Block a user