ADF 2.5.0 beta-2 (#494)

* upgrade libs

* remove page title workaround

* remove search workaround
This commit is contained in:
Denys Vuika
2018-07-07 08:28:34 +01:00
committed by GitHub
parent e75042aa46
commit 1ea1dc41c3
5 changed files with 22 additions and 106 deletions

36
package-lock.json generated
View File

@@ -5,11 +5,11 @@
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"@alfresco/adf-content-services": { "@alfresco/adf-content-services": {
"version": "2.4.0", "version": "2.5.0-834415c1ac82cd124efb0ae1b754bfe447a892ec",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-2.4.0.tgz", "resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-2.5.0-834415c1ac82cd124efb0ae1b754bfe447a892ec.tgz",
"integrity": "sha512-WHQFo1bokmc9hYi3C3zlQImvuajOJuycfjSmkyQ27sEQhsjzH7+lPXV7Loa8p5kGFIP6KBL61BxReCfJqIJDCA==", "integrity": "sha512-mhQpgadbL2OFv94mLpcNjuF6Ga2fMhpozBzmtb1SBx2tNe/ZrmX7EDxo+A8vXjQgUUyrnxj3Tw6Zayp7DXK7lQ==",
"requires": { "requires": {
"@alfresco/adf-core": "2.4.0", "@alfresco/adf-core": "2.5.0-834415c1ac82cd124efb0ae1b754bfe447a892ec",
"@angular/animations": "5.1.1", "@angular/animations": "5.1.1",
"@angular/cdk": "5.0.1", "@angular/cdk": "5.0.1",
"@angular/common": "5.1.1", "@angular/common": "5.1.1",
@@ -24,7 +24,7 @@
"@angular/platform-browser-dynamic": "5.1.1", "@angular/platform-browser-dynamic": "5.1.1",
"@angular/router": "5.1.1", "@angular/router": "5.1.1",
"@ngx-translate/core": "9.1.1", "@ngx-translate/core": "9.1.1",
"alfresco-js-api": "2.4.0", "alfresco-js-api": "2.5.0-3a53a7c2417f4e004631e5b5c76097cba312a714",
"chart.js": "2.5.0", "chart.js": "2.5.0",
"core-js": "2.4.1", "core-js": "2.4.1",
"hammerjs": "2.0.8", "hammerjs": "2.0.8",
@@ -41,9 +41,9 @@
}, },
"dependencies": { "dependencies": {
"alfresco-js-api": { "alfresco-js-api": {
"version": "2.4.0", "version": "2.5.0-3a53a7c2417f4e004631e5b5c76097cba312a714",
"resolved": "https://registry.npmjs.org/alfresco-js-api/-/alfresco-js-api-2.4.0.tgz", "resolved": "https://registry.npmjs.org/alfresco-js-api/-/alfresco-js-api-2.5.0-3a53a7c2417f4e004631e5b5c76097cba312a714.tgz",
"integrity": "sha512-XVf/B3fE0Rl632SU3w0/m6EX/HEwOebIHjP0tluJoD174VONiTsoBzUuicliZvsfuHAeLC5YqthCV4PaKnehCg==", "integrity": "sha512-hibbA/ziZuJ28xUnwyLbddsdn+idDHSSedonD0rzhuEsM3NN4SvHuQMSsHfssEDDQztKfYsWtjo5SjCjy+9JPA==",
"requires": { "requires": {
"event-emitter": "0.3.4", "event-emitter": "0.3.4",
"jsrsasign": "^8.0.12", "jsrsasign": "^8.0.12",
@@ -71,9 +71,9 @@
} }
}, },
"@alfresco/adf-core": { "@alfresco/adf-core": {
"version": "2.4.0", "version": "2.5.0-834415c1ac82cd124efb0ae1b754bfe447a892ec",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-2.4.0.tgz", "resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-2.5.0-834415c1ac82cd124efb0ae1b754bfe447a892ec.tgz",
"integrity": "sha512-sK0C3Q9yDjqpXV3l5DQXqyRRSiZ+RaUKU81BHEY7Bq1szbBhJq9bJ3rF6PfABzGwB9DKhy+nU+fftCneLJQcnA==", "integrity": "sha512-OVDRg4ps/sTGooLzQ2Sr/uG0F3ZJME8A8naAhMF6Errjin3L6Jjo/hbP7hBCjMB+V8dv3GBGLOvhoxUr29yzog==",
"requires": { "requires": {
"@angular/animations": "5.1.1", "@angular/animations": "5.1.1",
"@angular/cdk": "5.0.1", "@angular/cdk": "5.0.1",
@@ -89,7 +89,7 @@
"@angular/platform-browser-dynamic": "5.1.1", "@angular/platform-browser-dynamic": "5.1.1",
"@angular/router": "5.1.1", "@angular/router": "5.1.1",
"@ngx-translate/core": "9.1.1", "@ngx-translate/core": "9.1.1",
"alfresco-js-api": "2.4.0", "alfresco-js-api": "2.5.0-3a53a7c2417f4e004631e5b5c76097cba312a714",
"chart.js": "2.5.0", "chart.js": "2.5.0",
"core-js": "2.4.1", "core-js": "2.4.1",
"hammerjs": "2.0.8", "hammerjs": "2.0.8",
@@ -106,9 +106,9 @@
}, },
"dependencies": { "dependencies": {
"alfresco-js-api": { "alfresco-js-api": {
"version": "2.4.0", "version": "2.5.0-3a53a7c2417f4e004631e5b5c76097cba312a714",
"resolved": "https://registry.npmjs.org/alfresco-js-api/-/alfresco-js-api-2.4.0.tgz", "resolved": "https://registry.npmjs.org/alfresco-js-api/-/alfresco-js-api-2.5.0-3a53a7c2417f4e004631e5b5c76097cba312a714.tgz",
"integrity": "sha512-XVf/B3fE0Rl632SU3w0/m6EX/HEwOebIHjP0tluJoD174VONiTsoBzUuicliZvsfuHAeLC5YqthCV4PaKnehCg==", "integrity": "sha512-hibbA/ziZuJ28xUnwyLbddsdn+idDHSSedonD0rzhuEsM3NN4SvHuQMSsHfssEDDQztKfYsWtjo5SjCjy+9JPA==",
"requires": { "requires": {
"event-emitter": "0.3.4", "event-emitter": "0.3.4",
"jsrsasign": "^8.0.12", "jsrsasign": "^8.0.12",
@@ -668,9 +668,9 @@
"integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=" "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo="
}, },
"alfresco-js-api": { "alfresco-js-api": {
"version": "2.4.0", "version": "2.5.0-3a53a7c2417f4e004631e5b5c76097cba312a714",
"resolved": "https://registry.npmjs.org/alfresco-js-api/-/alfresco-js-api-2.4.0.tgz", "resolved": "https://registry.npmjs.org/alfresco-js-api/-/alfresco-js-api-2.5.0-3a53a7c2417f4e004631e5b5c76097cba312a714.tgz",
"integrity": "sha512-XVf/B3fE0Rl632SU3w0/m6EX/HEwOebIHjP0tluJoD174VONiTsoBzUuicliZvsfuHAeLC5YqthCV4PaKnehCg==", "integrity": "sha512-hibbA/ziZuJ28xUnwyLbddsdn+idDHSSedonD0rzhuEsM3NN4SvHuQMSsHfssEDDQztKfYsWtjo5SjCjy+9JPA==",
"requires": { "requires": {
"event-emitter": "0.3.4", "event-emitter": "0.3.4",
"jsrsasign": "^8.0.12", "jsrsasign": "^8.0.12",

View File

@@ -25,8 +25,8 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@alfresco/adf-content-services": "2.4.0", "@alfresco/adf-content-services": "2.5.0-834415c1ac82cd124efb0ae1b754bfe447a892ec",
"@alfresco/adf-core": "2.4.0", "@alfresco/adf-core": "2.5.0-834415c1ac82cd124efb0ae1b754bfe447a892ec",
"@angular/animations": "5.1.1", "@angular/animations": "5.1.1",
"@angular/cdk": "5.0.1", "@angular/cdk": "5.0.1",
"@angular/common": "5.1.1", "@angular/common": "5.1.1",
@@ -47,7 +47,7 @@
"@ngrx/store": "^5.2.0", "@ngrx/store": "^5.2.0",
"@ngrx/store-devtools": "^5.2.0", "@ngrx/store-devtools": "^5.2.0",
"@ngx-translate/core": "9.1.1", "@ngx-translate/core": "9.1.1",
"alfresco-js-api": "2.4.0", "alfresco-js-api": "2.5.0-3a53a7c2417f4e004631e5b5c76097cba312a714",
"core-js": "2.5.3", "core-js": "2.5.3",
"cspell": "^2.1.12", "cspell": "^2.1.12",
"hammerjs": "2.0.8", "hammerjs": "2.0.8",

View File

@@ -28,7 +28,7 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { TRANSLATION_PROVIDER, CoreModule, AppConfigService, PageTitleService, DebugAppConfigService } from '@alfresco/adf-core'; import { TRANSLATION_PROVIDER, CoreModule, AppConfigService, DebugAppConfigService } from '@alfresco/adf-core';
import { ContentModule } from '@alfresco/adf-content-services'; import { ContentModule } from '@alfresco/adf-content-services';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
@@ -68,7 +68,6 @@ import { NodeActionsService } from './common/services/node-actions.service';
import { NodePermissionService } from './common/services/node-permission.service'; import { NodePermissionService } from './common/services/node-permission.service';
import { SearchComponent } from './components/search/search.component'; import { SearchComponent } from './components/search/search.component';
import { SettingsComponent } from './components/settings/settings.component'; import { SettingsComponent } from './components/settings/settings.component';
import { PageTitleService as AcaPageTitleService } from './common/services/page-title.service';
import { ProfileResolver } from './common/services/profile.resolver'; import { ProfileResolver } from './common/services/profile.resolver';
import { ExperimentalGuard } from './common/services/experimental-guard.service'; import { ExperimentalGuard } from './common/services/experimental-guard.service';
@@ -144,7 +143,6 @@ import { CoreExtensionsModule } from './extensions/core.extensions';
ExperimentalDirective ExperimentalDirective
], ],
providers: [ providers: [
{ provide: PageTitleService, useClass: AcaPageTitleService },
{ provide: AppConfigService, useClass: DebugAppConfigService }, { provide: AppConfigService, useClass: DebugAppConfigService },
{ {
provide: TRANSLATION_PROVIDER, provide: TRANSLATION_PROVIDER,

View File

@@ -1,67 +0,0 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2018 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 { Title } from '@angular/platform-browser';
import { AppConfigService, TranslationService } from '@alfresco/adf-core';
@Injectable()
export class PageTitleService {
private originalTitle = '';
private translatedTitle = '';
constructor(
private titleService: Title,
private appConfig: AppConfigService,
private translationService: TranslationService) {
translationService.translate.onLangChange.subscribe(() => this.onLanguageChanged());
// TODO: contribute this fix to ADF 2.5.0
translationService.translate.onTranslationChange.subscribe(() => this.onLanguageChanged());
}
/**
* Sets the page title.
* @param value The new title
*/
setTitle(value: string = '') {
this.originalTitle = value;
this.translatedTitle = this.translationService.instant(value);
this.updateTitle();
}
private onLanguageChanged() {
this.translatedTitle = this.translationService.instant(this.originalTitle);
this.updateTitle();
}
private updateTitle() {
const name = this.appConfig.get('application.name') || 'Alfresco ADF Application';
const title = this.translatedTitle ? `${this.translatedTitle} - ${name}` : `${name}`;
this.titleService.setTitle(title);
}
}

View File

@@ -69,7 +69,6 @@ export class SearchComponent extends PageComponent implements OnInit {
super.ngOnInit(); super.ngOnInit();
this.sorting = this.getSorting(); this.sorting = this.getSorting();
this.resetSettings();
this.subscriptions.push( this.subscriptions.push(
this.queryBuilder.updated.subscribe(() => { this.queryBuilder.updated.subscribe(() => {
@@ -97,20 +96,6 @@ export class SearchComponent extends PageComponent implements OnInit {
} }
} }
// TODO: workaround for ADF 2.4.0 bug
private resetSettings() {
this.queryBuilder.categories
.map(category => category.component)
.filter(component => component.selector === 'check-list')
.map(component => component.settings.options || [])
.reduce((acc, value) => acc.concat(value), [])
.forEach(value => {
if (value.hasOwnProperty('checked')) {
value.checked = false;
}
});
}
private formatSearchQuery(userInput: string) { private formatSearchQuery(userInput: string) {
if (!userInput) { if (!userInput) {
return null; return null;