mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[AAE-10777] upgrade to latest ADF with common content services (#2970)
* upgrade to latest ADF with common content services * update fix [link-adf:dev-eromano-AAE-10777] * use latest ADF * fix unit tests * fix unit tests * fix tests * use latest ADF * fix theming * remove unused variables * fix user info --------- Co-authored-by: eromano <eugenioromano16@gmail.com>
This commit is contained in:
@@ -120,8 +120,8 @@ 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';
|
||||
import { UserInfoComponent } from './components/common/user-info/user-info.component';
|
||||
import { ContentManagementService } from './services/content-management.service';
|
||||
import { UserInfoComponent } from './components/common/user-info/user-info.component';
|
||||
|
||||
registerLocaleData(localeFr);
|
||||
registerLocaleData(localeDe);
|
||||
|
@@ -6,9 +6,10 @@
|
||||
* agreement is prohibited.
|
||||
*/
|
||||
|
||||
import { EcmUserModel, IdentityUserModel, PeopleContentService, IdentityUserService, AuthenticationService, UserInfoMode } from '@alfresco/adf-core';
|
||||
import { IdentityUserModel, IdentityUserService, AuthenticationService, UserInfoMode } from '@alfresco/adf-core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { EcmUserModel, PeopleContentService } from '@alfresco/adf-content-services';
|
||||
|
||||
@Component({
|
||||
selector: 'app-user-info',
|
||||
|
@@ -23,8 +23,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { NameColumnComponent } from '@alfresco/adf-content-services';
|
||||
import { NodesApiService } from '@alfresco/adf-core';
|
||||
import { NameColumnComponent, NodesApiService } from '@alfresco/adf-content-services';
|
||||
import { ChangeDetectorRef, Component, ElementRef, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { Actions, ofType } from '@ngrx/effects';
|
||||
import { Subject } from 'rxjs';
|
||||
|
@@ -25,7 +25,7 @@
|
||||
|
||||
import { AppExtensionService, ContentApiService, PageComponent } from '@alfresco/aca-shared';
|
||||
import { AppStore } from '@alfresco/aca-shared/store';
|
||||
import { UploadService } from '@alfresco/adf-core';
|
||||
import { UploadService } from '@alfresco/adf-content-services';
|
||||
import { MinimalNodeEntity, MinimalNodeEntryEntity, PathElementEntity, PathInfo } from '@alfresco/js-api';
|
||||
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
@@ -26,8 +26,15 @@
|
||||
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, UploadService, AppConfigModule, DataTableModule, PaginationModule } from '@alfresco/adf-core';
|
||||
import { DocumentListComponent, DocumentListService, FilterSearch, PathElementEntity, NodeFavoriteDirective } from '@alfresco/adf-content-services';
|
||||
import { DataTableComponent, AppConfigModule, DataTableModule, PaginationModule } from '@alfresco/adf-core';
|
||||
import {
|
||||
DocumentListComponent,
|
||||
DocumentListService,
|
||||
FilterSearch,
|
||||
PathElementEntity,
|
||||
NodeFavoriteDirective,
|
||||
UploadService
|
||||
} from '@alfresco/adf-content-services';
|
||||
import { NodeActionsService } from '../../services/node-actions.service';
|
||||
import { FilesComponent } from './files.component';
|
||||
import { AppTestingModule } from '../../testing/app-testing.module';
|
||||
|
@@ -23,7 +23,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { FileUploadEvent, ShowHeaderMode, UploadService } from '@alfresco/adf-core';
|
||||
import { ShowHeaderMode } from '@alfresco/adf-core';
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||
import { Store } from '@ngrx/store';
|
||||
@@ -34,7 +34,7 @@ import { AppExtensionService, ContentApiService, PageComponent } from '@alfresco
|
||||
import { SetCurrentFolderAction, isAdmin, AppStore, UploadFileVersionAction, showLoaderSelector } from '@alfresco/aca-shared/store';
|
||||
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
|
||||
import { debounceTime, takeUntil } from 'rxjs/operators';
|
||||
import { FilterSearch, ShareDataRow } from '@alfresco/adf-content-services';
|
||||
import { FilterSearch, ShareDataRow, UploadService, FileUploadEvent } from '@alfresco/adf-content-services';
|
||||
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
|
@@ -25,7 +25,8 @@
|
||||
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { AppConfigService, FileModel, UploadService, UserPreferencesService } from '@alfresco/adf-core';
|
||||
import { AppConfigService, UserPreferencesService } from '@alfresco/adf-core';
|
||||
import { FileModel, UploadService } from '@alfresco/adf-content-services';
|
||||
import { AppLayoutComponent } from './app-layout.component';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { Store } from '@ngrx/store';
|
||||
|
@@ -29,7 +29,7 @@ import { MinimalNodeEntity } from '@alfresco/js-api';
|
||||
import { ContentManagementService } from '../../services/content-management.service';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { AppStore } from '@alfresco/aca-shared/store';
|
||||
import { UploadService } from '@alfresco/adf-core';
|
||||
import { UploadService } from '@alfresco/adf-content-services';
|
||||
import { debounceTime } from 'rxjs/operators';
|
||||
import { Router } from '@angular/router';
|
||||
import { AppExtensionService, PageComponent } from '@alfresco/aca-shared';
|
||||
|
@@ -28,7 +28,7 @@ import { MinimalNodeEntity } from '@alfresco/js-api';
|
||||
import { ViewNodeAction, NavigateToFolder } from '@alfresco/aca-shared/store';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { BehaviorSubject, Subject } from 'rxjs';
|
||||
import { NodesApiService } from '@alfresco/adf-core';
|
||||
import { NodesApiService } from '@alfresco/adf-content-services';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
|
@@ -28,7 +28,7 @@ import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
|
||||
import { ContentManagementService } from '../../services/content-management.service';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { debounceTime } from 'rxjs/operators';
|
||||
import { UploadService } from '@alfresco/adf-core';
|
||||
import { UploadService } from '@alfresco/adf-content-services';
|
||||
import { Router } from '@angular/router';
|
||||
import { MinimalNodeEntity } from '@alfresco/js-api';
|
||||
import { AppExtensionService, AppHookService, PageComponent } from '@alfresco/aca-shared';
|
||||
|
@@ -12,6 +12,7 @@ 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';
|
||||
|
||||
describe('ViewProfileComponent', () => {
|
||||
let fixture: ComponentFixture<ViewProfileComponent>;
|
||||
@@ -20,7 +21,7 @@ describe('ViewProfileComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, AppConfigModule, FormsModule, ReactiveFormsModule],
|
||||
imports: [AppTestingModule, AppConfigModule, FormsModule, ReactiveFormsModule, MatDividerModule],
|
||||
declarations: [ViewProfileComponent]
|
||||
});
|
||||
|
||||
|
@@ -53,11 +53,18 @@ import { AppHookService, ContentApiService } from '@alfresco/aca-shared';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { ContentManagementService } from './content-management.service';
|
||||
import { NodeActionsService } from './node-actions.service';
|
||||
import { TranslationService, NodesApiService, FileModel, NotificationService } from '@alfresco/adf-core';
|
||||
import { TranslationService, NotificationService } from '@alfresco/adf-core';
|
||||
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
||||
import { MatSnackBarRef, SimpleSnackBar } from '@angular/material/snack-bar';
|
||||
import { NodeEntry, Node, VersionPaging, MinimalNodeEntity } from '@alfresco/js-api';
|
||||
import { NewVersionUploaderDataAction, NewVersionUploaderService, NodeAspectService, ViewVersion } from '@alfresco/adf-content-services';
|
||||
import {
|
||||
NewVersionUploaderDataAction,
|
||||
NewVersionUploaderService,
|
||||
NodeAspectService,
|
||||
ViewVersion,
|
||||
NodesApiService,
|
||||
FileModel
|
||||
} from '@alfresco/adf-content-services';
|
||||
|
||||
describe('ContentManagementService', () => {
|
||||
let dialog: MatDialog;
|
||||
|
@@ -54,9 +54,10 @@ import {
|
||||
NewVersionUploaderService,
|
||||
NewVersionUploaderDialogData,
|
||||
NewVersionUploaderData,
|
||||
NewVersionUploaderDataAction
|
||||
NewVersionUploaderDataAction,
|
||||
NodesApiService
|
||||
} from '@alfresco/adf-content-services';
|
||||
import { TranslationService, NodesApiService, NotificationService } from '@alfresco/adf-core';
|
||||
import { TranslationService, NotificationService } from '@alfresco/adf-core';
|
||||
import {
|
||||
DeletedNodesPaging,
|
||||
MinimalNodeEntity,
|
||||
|
@@ -26,14 +26,15 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { Observable, Subject, of, zip, from } from 'rxjs';
|
||||
import { AlfrescoApiService, ContentService, DataColumn, TranslationService, ThumbnailService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, DataColumn, TranslationService, ThumbnailService } from '@alfresco/adf-core';
|
||||
import {
|
||||
DocumentListService,
|
||||
ContentNodeSelectorComponent,
|
||||
ContentNodeSelectorComponentData,
|
||||
ContentNodeDialogService,
|
||||
ShareDataRow,
|
||||
NodeAction
|
||||
NodeAction,
|
||||
ContentService
|
||||
} from '@alfresco/adf-content-services';
|
||||
import {
|
||||
MinimalNodeEntity,
|
||||
|
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
import { AppStore, DownloadNodesAction, NodeActionTypes, NodeInfo, getAppSelection, getCurrentVersion } from '@alfresco/aca-shared/store';
|
||||
import { DownloadZipDialogComponent } from '@alfresco/adf-core';
|
||||
import { DownloadZipDialogComponent } from '@alfresco/adf-content-services';
|
||||
import { MinimalNodeEntity, Version } from '@alfresco/js-api';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
|
@@ -50,7 +50,7 @@ import {
|
||||
ManagePermissionsAction,
|
||||
ShowLoaderAction
|
||||
} from '@alfresco/aca-shared/store';
|
||||
import { RenditionViewerService } from '@alfresco/adf-content-services';
|
||||
import { RenditionService } from '@alfresco/adf-content-services';
|
||||
import { ViewerEffects } from './viewer.effects';
|
||||
import { Router } from '@angular/router';
|
||||
import { of } from 'rxjs';
|
||||
@@ -58,19 +58,19 @@ import { of } from 'rxjs';
|
||||
describe('NodeEffects', () => {
|
||||
let store: Store<any>;
|
||||
let contentService: ContentManagementService;
|
||||
let renditionViewerService: RenditionViewerService;
|
||||
let renditionViewerService: RenditionService;
|
||||
let viewerEffects: ViewerEffects;
|
||||
let router: Router;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, SharedStoreModule, EffectsModule.forRoot([NodeEffects, ViewerEffects])],
|
||||
providers: [RenditionViewerService]
|
||||
providers: [RenditionService]
|
||||
});
|
||||
|
||||
store = TestBed.inject(Store);
|
||||
contentService = TestBed.inject(ContentManagementService);
|
||||
renditionViewerService = TestBed.inject(RenditionViewerService);
|
||||
renditionViewerService = TestBed.inject(RenditionService);
|
||||
viewerEffects = TestBed.inject(ViewerEffects);
|
||||
router = TestBed.inject(Router);
|
||||
});
|
||||
|
@@ -53,7 +53,7 @@ import {
|
||||
ShowLoaderAction
|
||||
} from '@alfresco/aca-shared/store';
|
||||
import { ContentManagementService } from '../../services/content-management.service';
|
||||
import { RenditionViewerService } from '@alfresco/adf-content-services';
|
||||
import { RenditionService } from '@alfresco/adf-content-services';
|
||||
|
||||
@Injectable()
|
||||
export class NodeEffects {
|
||||
@@ -61,7 +61,7 @@ export class NodeEffects {
|
||||
private store: Store<AppStore>,
|
||||
private actions$: Actions,
|
||||
private contentService: ContentManagementService,
|
||||
private renditionViewer: RenditionViewerService
|
||||
private renditionViewer: RenditionService
|
||||
) {}
|
||||
|
||||
shareNode$ = createEffect(
|
||||
|
@@ -29,7 +29,7 @@ import { EffectsModule } from '@ngrx/effects';
|
||||
import { UploadEffects } from './upload.effects';
|
||||
import { AppTestingModule } from '../../testing/app-testing.module';
|
||||
import { NgZone } from '@angular/core';
|
||||
import { UploadService, FileUploadCompleteEvent, FileModel } from '@alfresco/adf-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';
|
||||
|
||||
|
@@ -33,7 +33,7 @@ import {
|
||||
UploadFolderAction,
|
||||
getCurrentFolder
|
||||
} from '@alfresco/aca-shared/store';
|
||||
import { FileModel, FileUtils, UploadService } from '@alfresco/adf-core';
|
||||
import { FileUtils } from '@alfresco/adf-core';
|
||||
import { Injectable, NgZone, RendererFactory2 } from '@angular/core';
|
||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
||||
import { Store } from '@ngrx/store';
|
||||
@@ -41,6 +41,7 @@ import { of } from 'rxjs';
|
||||
import { catchError, map, take } from 'rxjs/operators';
|
||||
import { ContentManagementService } from '../../services/content-management.service';
|
||||
import { MinimalNodeEntryEntity } from '@alfresco/js-api';
|
||||
import { UploadService, FileModel } from '@alfresco/adf-content-services';
|
||||
|
||||
@Injectable()
|
||||
export class UploadEffects {
|
||||
|
@@ -30,11 +30,11 @@ import {
|
||||
TranslationService,
|
||||
TranslationMock,
|
||||
AuthenticationService,
|
||||
DiscoveryApiService,
|
||||
AlfrescoApiService,
|
||||
PipeModule,
|
||||
AlfrescoApiServiceMock
|
||||
} from '@alfresco/adf-core';
|
||||
import { DiscoveryApiService } from '@alfresco/adf-content-services';
|
||||
import { RepositoryInfo } from '@alfresco/js-api';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { StoreModule } from '@ngrx/store';
|
||||
|
@@ -14,20 +14,20 @@ $aca-primary-blue: (
|
||||
A400: #2a7de1,
|
||||
A700: #00c1de,
|
||||
contrast: (
|
||||
50: #000000,
|
||||
100: #000000,
|
||||
200: #000000,
|
||||
300: #ffffff,
|
||||
400: #ffffff,
|
||||
500: #ffffff,
|
||||
600: #ffffff,
|
||||
700: #ffffff,
|
||||
800: #ffffff,
|
||||
900: #ffffff,
|
||||
A100: #ffffff,
|
||||
A200: #ffffff,
|
||||
A400: #ffffff,
|
||||
A700: #000000
|
||||
50: $black-87-opacity,
|
||||
100: $black-87-opacity,
|
||||
200: $black-87-opacity,
|
||||
300: $black-87-opacity,
|
||||
400: $black-87-opacity,
|
||||
500: white,
|
||||
600: white,
|
||||
700: white,
|
||||
800: $white-87-opacity,
|
||||
900: $white-87-opacity,
|
||||
A100: $black-87-opacity,
|
||||
A200: white,
|
||||
A400: white,
|
||||
A700: white,
|
||||
)
|
||||
);
|
||||
|
||||
@@ -47,20 +47,20 @@ $aca-accent-green: (
|
||||
A400: #76bc21,
|
||||
A700: #c2e76b,
|
||||
contrast: (
|
||||
50: #000000,
|
||||
100: #000000,
|
||||
200: #000000,
|
||||
300: #000000,
|
||||
400: #000000,
|
||||
500: #ffffff,
|
||||
600: #ffffff,
|
||||
700: #ffffff,
|
||||
800: #ffffff,
|
||||
900: #ffffff,
|
||||
A100: #ffffff,
|
||||
A200: #ffffff,
|
||||
A400: #000000,
|
||||
A700: #000000
|
||||
50: $black-87-opacity,
|
||||
100: $black-87-opacity,
|
||||
200: $black-87-opacity,
|
||||
300: $black-87-opacity,
|
||||
400: $black-87-opacity,
|
||||
500: white,
|
||||
600: white,
|
||||
700: white,
|
||||
800: $white-87-opacity,
|
||||
900: $white-87-opacity,
|
||||
A100: $black-87-opacity,
|
||||
A200: white,
|
||||
A400: white,
|
||||
A700: white,
|
||||
)
|
||||
);
|
||||
|
||||
@@ -80,19 +80,19 @@ $aca-warn: (
|
||||
A400: #ff5252,
|
||||
A700: #ff8a80,
|
||||
contrast: (
|
||||
50: #000000,
|
||||
100: #000000,
|
||||
200: #000000,
|
||||
300: #ffffff,
|
||||
400: #ffffff,
|
||||
500: #ffffff,
|
||||
600: #ffffff,
|
||||
700: #ffffff,
|
||||
800: #ffffff,
|
||||
900: #ffffff,
|
||||
A100: #ffffff,
|
||||
A200: #ffffff,
|
||||
A400: #ffffff,
|
||||
A700: #000000
|
||||
50: $black-87-opacity,
|
||||
100: $black-87-opacity,
|
||||
200: $black-87-opacity,
|
||||
300: $black-87-opacity,
|
||||
400: $black-87-opacity,
|
||||
500: white,
|
||||
600: white,
|
||||
700: white,
|
||||
800: $white-87-opacity,
|
||||
900: $white-87-opacity,
|
||||
A100: $black-87-opacity,
|
||||
A200: white,
|
||||
A400: white,
|
||||
A700: white,
|
||||
)
|
||||
);
|
||||
|
@@ -7,23 +7,10 @@ $foreground: map-get($custom-theme, foreground);
|
||||
$background: map-get($custom-theme, background);
|
||||
|
||||
//Custom variables - ACA specific styling:
|
||||
$document-list-selection-color: mat.get-color-from-palette($alfresco-ecm-blue, 500);
|
||||
$document-list-background: white;
|
||||
$data-table-dividers-wrapper-border: none;
|
||||
$data-table-thumbnail-width: 35px;
|
||||
$data-table-cell-min-width: 150px;
|
||||
$data-table-cell-min-width--no-grow: 120px;
|
||||
$data-table-cell-min-width--fileSize: 110px !important;
|
||||
$data-table-cell-text-color: mat.get-color-from-palette($foreground, text, 0.54);
|
||||
$data-table-cell-link-color: mat.get-color-from-palette($foreground, text);
|
||||
$data-table-hover-color: #e3fafd;
|
||||
$data-table-selection-color: #e3fafd;
|
||||
|
||||
$adf-pagination--border: 1px solid mat.get-color-from-palette($foreground, text, 0.07);
|
||||
$adf-pagination__empty--height: 0;
|
||||
|
||||
$adf-toolbar-single-row-height: 48px;
|
||||
$adf-toolbar-padding: 14px;
|
||||
$data-table-cell-min-width--file-size: 110px !important;
|
||||
|
||||
$adf-upload-dragging-color: unset;
|
||||
$adf-upload-dragging-border: 1px solid #00bcd4;
|
||||
@@ -31,8 +18,6 @@ $adf-upload-dragging-background: #e0f7fa;
|
||||
$adf-upload-dragging-level1-color: unset;
|
||||
$adf-upload-dragging-level1-border: none;
|
||||
|
||||
$adf-permission-list-width: 100%;
|
||||
|
||||
$grey-background: rgba(33, 33, 33, 0.12);
|
||||
$grey-text-background: rgba(33, 33, 33, 0.05);
|
||||
$grey-hover-background: rgba(33, 33, 33, 0.24);
|
||||
|
Reference in New Issue
Block a user