upgrade to latest ADF 3.2 alpha (#1069)

This commit is contained in:
Denys Vuika
2019-04-12 15:26:49 +01:00
committed by GitHub
parent 2001bcd447
commit 59fa28f683
5 changed files with 68 additions and 149 deletions

59
package-lock.json generated
View File

@@ -5,25 +5,25 @@
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"@alfresco/adf-content-services": { "@alfresco/adf-content-services": {
"version": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad", "version": "3.2.0-6ad63055b35b43eb305359b6f47851facd672476",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad.tgz", "resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-3.2.0-6ad63055b35b43eb305359b6f47851facd672476.tgz",
"integrity": "sha512-X/5oQdWxdV1ij8yIwim5LHEj2gIFywHBZ3/PBBSlk1TAiY2lWt/QIJ3fPbqIGrXarp5vezA/NCiXPI1BPTyNvw==", "integrity": "sha512-em9lmfsdco7q6nQrvBsnnyxZhxYFgqsjnrPUJkF30U20HVbLn9C0PQpqch24qoJGF//qMzvnIR+DmkeUmYntbA==",
"requires": { "requires": {
"tslib": "^1.9.0" "tslib": "^1.9.0"
} }
}, },
"@alfresco/adf-core": { "@alfresco/adf-core": {
"version": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad", "version": "3.2.0-dac3bed09f5e8235868555c24102f91dcae9c6e1",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad.tgz", "resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-3.2.0-dac3bed09f5e8235868555c24102f91dcae9c6e1.tgz",
"integrity": "sha512-Z3DSR/gu9vlmczmXJHt07p49e6cl9aJ4Xu3Xj/MGlrveUG333v4wCwaTMfSaVv80Ca5QhKqR+P/vHLjvJuoAhw==", "integrity": "sha512-GwSkh42tUvTRjfnkZ8kJiuF8wB0C4137cm/JA11raT5mihrCzTBwH3GutmnWRZuxLXE4wwKRquTD5s0Bbh4K1w==",
"requires": { "requires": {
"tslib": "^1.9.0" "tslib": "^1.9.0"
} }
}, },
"@alfresco/adf-extensions": { "@alfresco/adf-extensions": {
"version": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad", "version": "3.2.0-6ad63055b35b43eb305359b6f47851facd672476",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad.tgz", "resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.2.0-6ad63055b35b43eb305359b6f47851facd672476.tgz",
"integrity": "sha512-eVL1O1yZFQJdvOfrHwD+NW7kox2lkhldX/5FOUD7X70my6MGQjXPtPupwhruvda94LFgjM8FDmbSr8ahns+KQw==", "integrity": "sha512-YIFi8iZg8/2/e866a9KXb3sOlzbjd1MePp7L0bA2YLQE+gOw7Xka4e++ieZtLA6Oo7SWZt1l6wkdfscx+WS/cQ==",
"requires": { "requires": {
"tslib": "^1.9.0" "tslib": "^1.9.0"
} }
@@ -4959,7 +4959,8 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
@@ -4980,12 +4981,14 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
@@ -5000,17 +5003,20 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@@ -5127,7 +5133,8 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@@ -5139,6 +5146,7 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
@@ -5153,6 +5161,7 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
@@ -5160,12 +5169,14 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@@ -5184,6 +5195,7 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@@ -5264,7 +5276,8 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
@@ -5276,6 +5289,7 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@@ -5361,7 +5375,8 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
@@ -5397,6 +5412,7 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
@@ -5416,6 +5432,7 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
@@ -5459,12 +5476,14 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
} }
} }
}, },

View File

@@ -36,9 +36,9 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@alfresco/adf-content-services": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad", "@alfresco/adf-content-services": "3.2.0-6ad63055b35b43eb305359b6f47851facd672476",
"@alfresco/adf-core": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad", "@alfresco/adf-core": "3.2.0-dac3bed09f5e8235868555c24102f91dcae9c6e1",
"@alfresco/adf-extensions": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad", "@alfresco/adf-extensions": "3.2.0-6ad63055b35b43eb305359b6f47851facd672476",
"@alfresco/js-api": "3.1.0-2c7e78d49c51ba0966d4e6c4dedf2b64da83d630", "@alfresco/js-api": "3.1.0-2c7e78d49c51ba0966d4e6c4dedf2b64da83d630",
"@angular/animations": "7.2.12", "@angular/animations": "7.2.12",
"@angular/cdk": "^7.3.7", "@angular/cdk": "^7.3.7",

View File

@@ -39,8 +39,7 @@ import {
} from '@alfresco/adf-core'; } from '@alfresco/adf-core';
import { import {
LibraryDialogComponent, LibraryDialogComponent,
ContentModule, ContentModule
CustomResourcesService
} from '@alfresco/adf-content-services'; } from '@alfresco/adf-content-services';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
@@ -76,7 +75,6 @@ import { AppLoginModule } from './components/login/login.module';
import { AppHeaderModule } from './components/header/header.module'; import { AppHeaderModule } from './components/header/header.module';
import { AppNodeVersionModule } from './components/node-version/node-version.module'; import { AppNodeVersionModule } from './components/node-version/node-version.module';
import { environment } from '../environments/environment'; import { environment } from '../environments/environment';
import { AppDataService } from './services/data.service';
@NgModule({ @NgModule({
imports: [ imports: [
@@ -124,7 +122,6 @@ import { AppDataService } from './services/data.service';
providers: [ providers: [
{ provide: RouteReuseStrategy, useClass: AppRouteReuseStrategy }, { provide: RouteReuseStrategy, useClass: AppRouteReuseStrategy },
{ provide: AppConfigService, useClass: DebugAppConfigService }, { provide: AppConfigService, useClass: DebugAppConfigService },
{ provide: CustomResourcesService, useClass: AppDataService },
{ {
provide: TRANSLATION_PROVIDER, provide: TRANSLATION_PROVIDER,
multi: true, multi: true,

View File

@@ -54,7 +54,6 @@ import { AppExtensionService } from '../../extensions/extension.service';
import { ContentManagementService } from '../../services/content-management.service'; import { ContentManagementService } from '../../services/content-management.service';
import { ContentActionRef, ViewerExtensionRef } from '@alfresco/adf-extensions'; import { ContentActionRef, ViewerExtensionRef } from '@alfresco/adf-extensions';
import { SearchRequest } from '@alfresco/js-api'; import { SearchRequest } from '@alfresco/js-api';
import { AppDataService } from '../../services/data.service';
import { from } from 'rxjs'; import { from } from 'rxjs';
@Component({ @Component({
@@ -85,10 +84,33 @@ export class PreviewComponent extends PageComponent
contentExtensions: Array<ViewerExtensionRef> = []; contentExtensions: Array<ViewerExtensionRef> = [];
showRightSide = false; showRightSide = false;
recentFileFilters = [
'TYPE:"content"',
'-PNAME:"0/wiki"',
'-TYPE:"app:filelink"',
'-TYPE:"fm:post"',
'-TYPE:"cm:thumbnail"',
'-TYPE:"cm:failedThumbnail"',
'-TYPE:"cm:rating"',
'-TYPE:"dl:dataList"',
'-TYPE:"dl:todoList"',
'-TYPE:"dl:issue"',
'-TYPE:"dl:contact"',
'-TYPE:"dl:eventAgenda"',
'-TYPE:"dl:event"',
'-TYPE:"dl:task"',
'-TYPE:"dl:simpletask"',
'-TYPE:"dl:meetingAgenda"',
'-TYPE:"dl:location"',
'-TYPE:"fm:topic"',
'-TYPE:"fm:post"',
'-TYPE:"ia:calendarEvent"',
'-TYPE:"lnk:link"'
];
constructor( constructor(
private contentApi: ContentApiService, private contentApi: ContentApiService,
private preferences: UserPreferencesService, private preferences: UserPreferencesService,
private appDataService: AppDataService,
private route: ActivatedRoute, private route: ActivatedRoute,
private router: Router, private router: Router,
private apiService: AlfrescoApiService, private apiService: AlfrescoApiService,
@@ -370,7 +392,7 @@ export class PreviewComponent extends PageComponent
{ query: `cm:modified:[NOW/DAY-30DAYS TO NOW/DAY+1DAY]` }, { query: `cm:modified:[NOW/DAY-30DAYS TO NOW/DAY+1DAY]` },
{ query: `cm:modifier:${username} OR cm:creator:${username}` }, { query: `cm:modifier:${username} OR cm:creator:${username}` },
{ {
query: this.appDataService.recentFileFilters.join(' AND ') query: this.recentFileFilters.join(' AND ')
} }
], ],
fields: ['id', this.getRootField(sortingKey)], fields: ['id', this.getRootField(sortingKey)],

View File

@@ -1,119 +0,0 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2019 Alfresco Software Limited
*
* 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
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { Injectable } from '@angular/core';
import { CustomResourcesService } from '@alfresco/adf-content-services';
import {
PaginationModel,
LogService,
AlfrescoApiService
} from '@alfresco/adf-core';
import { Observable } from 'rxjs';
import { PersonEntry, SearchRequest, ResultSetPaging } from '@alfresco/js-api';
@Injectable({
providedIn: 'root'
})
export class AppDataService extends CustomResourcesService {
recentFileFilters = [
'TYPE:"content"',
'-PNAME:"0/wiki"',
'-TYPE:"app:filelink"',
'-TYPE:"fm:post"',
'-TYPE:"cm:thumbnail"',
'-TYPE:"cm:failedThumbnail"',
'-TYPE:"cm:rating"',
'-TYPE:"dl:dataList"',
'-TYPE:"dl:todoList"',
'-TYPE:"dl:issue"',
'-TYPE:"dl:contact"',
'-TYPE:"dl:eventAgenda"',
'-TYPE:"dl:event"',
'-TYPE:"dl:task"',
'-TYPE:"dl:simpletask"',
'-TYPE:"dl:meetingAgenda"',
'-TYPE:"dl:location"',
'-TYPE:"fm:topic"',
'-TYPE:"fm:post"',
'-TYPE:"ia:calendarEvent"',
'-TYPE:"lnk:link"'
];
constructor(private api: AlfrescoApiService, logService: LogService) {
super(api, logService);
}
getRecentFiles(
personId: string,
pagination: PaginationModel
): Observable<ResultSetPaging> {
return new Observable(observer => {
this.api.peopleApi.getPerson(personId).then(
(person: PersonEntry) => {
const username = person.entry.id;
const query: SearchRequest = {
query: {
query: '*',
language: 'afts'
},
filterQueries: [
{ query: `cm:modified:[NOW/DAY-30DAYS TO NOW/DAY+1DAY]` },
{ query: `cm:modifier:${username} OR cm:creator:${username}` },
{
query: this.recentFileFilters.join(' AND ')
}
],
include: ['path', 'properties', 'allowableOperations'],
sort: [
{
type: 'FIELD',
field: 'cm:modified',
ascending: false
}
],
paging: {
maxItems: pagination.maxItems,
skipCount: pagination.skipCount
}
};
return this.api.searchApi.search(query).then(
searchResult => {
observer.next(searchResult);
observer.complete();
},
err => {
observer.error(err);
observer.complete();
}
);
},
err => {
observer.error(err);
observer.complete();
}
);
});
}
}