mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-19 17:14:45 +00:00
[ACA-805] about screen enhancements (#813)
* upgrade to latest adf-extensions * switch to ADF RepositoryState * show extensions on About page, i18n fixes * update docs * cleanup about styles * greatly simplify app dependencies rendering * fix linting * fix tests
This commit is contained in:
parent
01ea887d5d
commit
26b4b0684f
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,7 +4,6 @@
|
|||||||
/dist
|
/dist
|
||||||
/tmp
|
/tmp
|
||||||
/out-tsc
|
/out-tsc
|
||||||
/src/versions.json
|
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
/node_modules
|
/node_modules
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
"src/assets",
|
"src/assets",
|
||||||
"src/favicon-96x96.png",
|
"src/favicon-96x96.png",
|
||||||
"src/app.config.json",
|
"src/app.config.json",
|
||||||
"src/versions.json",
|
|
||||||
{
|
{
|
||||||
"glob": "**/*",
|
"glob": "**/*",
|
||||||
"input": "node_modules/@alfresco/adf-core/prebuilt-themes",
|
"input": "node_modules/@alfresco/adf-core/prebuilt-themes",
|
||||||
@ -155,7 +154,6 @@
|
|||||||
"src/assets",
|
"src/assets",
|
||||||
"src/favicon-96x96.png",
|
"src/favicon-96x96.png",
|
||||||
"src/app.config.json",
|
"src/app.config.json",
|
||||||
"src/versions.json",
|
|
||||||
{
|
{
|
||||||
"glob": "**/*",
|
"glob": "**/*",
|
||||||
"input": "node_modules/@alfresco/adf-core/prebuilt-themes",
|
"input": "node_modules/@alfresco/adf-core/prebuilt-themes",
|
||||||
@ -187,7 +185,8 @@
|
|||||||
"src/tsconfig.spec.json"
|
"src/tsconfig.spec.json"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"**/node_modules/**"
|
"**/node_modules/**",
|
||||||
|
"package.json"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -217,7 +216,8 @@
|
|||||||
"e2e/tsconfig.e2e.json"
|
"e2e/tsconfig.e2e.json"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"**/node_modules/**"
|
"**/node_modules/**",
|
||||||
|
"package.json"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,13 @@ The format is represented by a JSON file with the structure similar to the follo
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"$name": "app",
|
"$id": "unique.id",
|
||||||
|
"$name": "extension.name",
|
||||||
"$version": "1.0.0",
|
"$version": "1.0.0",
|
||||||
|
"$vendor": "author.name",
|
||||||
|
"$license": "license",
|
||||||
|
"$runtime": "1.5.0",
|
||||||
|
"$description": "some description",
|
||||||
|
|
||||||
"routes": [],
|
"routes": [],
|
||||||
"actions": [],
|
"actions": [],
|
||||||
@ -311,4 +316,4 @@ exposed by the application with a custom one coming with the plugin.
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -567,8 +567,12 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["$name", "$version"],
|
"required": ["$id", "$name", "$version", "$vendor", "$license", "$runtime"],
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"$id": {
|
||||||
|
"description": "Unique identifier",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"$name": {
|
"$name": {
|
||||||
"description": "Extension name",
|
"description": "Extension name",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@ -577,8 +581,21 @@
|
|||||||
"description": "Extension version",
|
"description": "Extension version",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"$vendor": {
|
||||||
|
"description": "Extension owner",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"$license": {
|
||||||
|
"description": "Indicates the license of the extension.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"$runtime": {
|
||||||
|
"description": "Minimal extension runtime supported by extension",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"$description": {
|
"$description": {
|
||||||
"description": "Brief description on what the extension does"
|
"description": "Brief description on what the extension does",
|
||||||
|
"type": "string"
|
||||||
},
|
},
|
||||||
"$references": {
|
"$references": {
|
||||||
"description": "References to external files",
|
"description": "References to external files",
|
||||||
|
6
package-lock.json
generated
6
package-lock.json
generated
@ -21,9 +21,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@alfresco/adf-extensions": {
|
"@alfresco/adf-extensions": {
|
||||||
"version": "2.6.1",
|
"version": "3.0.0-383b74151a47e188020249aea7ec0dfb586bd0b6",
|
||||||
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-2.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.0.0-383b74151a47e188020249aea7ec0dfb586bd0b6.tgz",
|
||||||
"integrity": "sha512-YF2+wd2Tsy7wk3TjoJNli7B0J3WOowD1wsOdve0RHQdBlkG90tfVqHEVIQgRm24N2T4d0tOxhxcfGwaJcWE6Rw==",
|
"integrity": "sha512-pAI4DoDMqek2G1sEFeHpgZ0OkUhSTmp95XWC+b3OoUroztwOC0y2a/PqLUvDgm5aTe4hVsA+r6IRMkp7aA1KAA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "^1.9.0"
|
"tslib": "^1.9.0"
|
||||||
}
|
}
|
||||||
|
13
package.json
13
package.json
@ -4,15 +4,14 @@
|
|||||||
"license": "LGPL-3.0",
|
"license": "LGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "npm run server-versions && ng serve --open",
|
"start": "ng serve --open",
|
||||||
"start:prod": "npm run server-versions && ng serve --prod --open",
|
"start:prod": "ng serve --prod --open",
|
||||||
"build": "npm run server-versions && node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build app --prod",
|
"build": "node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build app --prod",
|
||||||
"build:dev": "npm run server-versions && ng build",
|
"build:dev": "ng build",
|
||||||
"build.e2e": "npm run server-versions && node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build app --configuration=e2e",
|
"build.e2e": "node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build app --configuration=e2e",
|
||||||
"test": "ng test app --code-coverage",
|
"test": "ng test app --code-coverage",
|
||||||
"test:ci": "ng test app --code-coverage --watch=false",
|
"test:ci": "ng test app --code-coverage --watch=false",
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
"server-versions": "rimraf ./src/versions.json && npm list --depth=0 --json=true --prod=true > ./src/versions.json || exit 0",
|
|
||||||
"wd:update": "webdriver-manager update --gecko=false",
|
"wd:update": "webdriver-manager update --gecko=false",
|
||||||
"e2e": "npm run wd:update && protractor --baseUrl=http://localhost:4000",
|
"e2e": "npm run wd:update && protractor --baseUrl=http://localhost:4000",
|
||||||
"e2e.local": "npm run wd:update && protractor --baseUrl=http://localhost:4200",
|
"e2e.local": "npm run wd:update && protractor --baseUrl=http://localhost:4200",
|
||||||
@ -33,7 +32,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alfresco/adf-content-services": "2.6.1",
|
"@alfresco/adf-content-services": "2.6.1",
|
||||||
"@alfresco/adf-core": "2.6.1",
|
"@alfresco/adf-core": "2.6.1",
|
||||||
"@alfresco/adf-extensions": "2.6.1",
|
"@alfresco/adf-extensions": "3.0.0-383b74151a47e188020249aea7ec0dfb586bd0b6",
|
||||||
"@angular/animations": "7.0.3",
|
"@angular/animations": "7.0.3",
|
||||||
"@angular/cdk": "^7.0.3",
|
"@angular/cdk": "^7.0.3",
|
||||||
"@angular/common": "7.0.3",
|
"@angular/common": "7.0.3",
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
"redirectUriLogout": "/logout"
|
"redirectUriLogout": "/logout"
|
||||||
},
|
},
|
||||||
"application": {
|
"application": {
|
||||||
"name": "Alfresco",
|
"name": "Alfresco Content Application",
|
||||||
"logo": "assets/images/alfresco-logo-flower.svg",
|
"logo": "assets/images/alfresco-logo-flower.svg",
|
||||||
"copyright": "© 2017 - 2018 Alfresco Software, Inc. All rights reserved."
|
"copyright": "© 2017 - 2018 Alfresco Software, Inc. All rights reserved."
|
||||||
},
|
},
|
||||||
|
@ -1,38 +1,126 @@
|
|||||||
<app-page-layout>
|
<app-page-layout>
|
||||||
|
|
||||||
<app-page-layout-content [scrollable]="true">
|
<app-page-layout-content [scrollable]="true">
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<article class="padding">
|
<article>
|
||||||
<header class="header padding-left">Alfresco Content Application</header>
|
<header>{{ 'application.name' | adfAppConfig }}</header>
|
||||||
<p class="padding-left"> version: {{ releaseVersion }} </p>
|
<p>{{ 'APP.ABOUT.VERSION' | translate }} {{ releaseVersion }}</p>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<article *ngIf="repository" class="padding">
|
<article>
|
||||||
<header class="header padding-left">Alfresco Content Services</header>
|
<header>{{ 'APP.ABOUT.PLUGINS.TITLE' | translate }}</header>
|
||||||
<p class="padding-left"> version: {{ repository.edition }} {{ repository.version.display }} </p>
|
<div>
|
||||||
|
<mat-table [dataSource]="extensions$ | async">
|
||||||
|
<ng-container matColumnDef="$id">
|
||||||
|
<mat-header-cell *matHeaderCellDef
|
||||||
|
>{{ 'APP.ABOUT.PLUGINS.ID' | translate }}
|
||||||
|
</mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let element">{{ element.$id }}</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="$name">
|
||||||
|
<mat-header-cell *matHeaderCellDef>{{
|
||||||
|
'APP.ABOUT.PLUGINS.NAME' | translate
|
||||||
|
}}</mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let element">{{ element.$name }}</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="$version">
|
||||||
|
<mat-header-cell *matHeaderCellDef>{{
|
||||||
|
'APP.ABOUT.PLUGINS.VERSION' | translate
|
||||||
|
}}</mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let element">{{
|
||||||
|
element.$version
|
||||||
|
}}</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="$vendor">
|
||||||
|
<mat-header-cell *matHeaderCellDef>{{
|
||||||
|
'APP.ABOUT.PLUGINS.VENDOR' | translate
|
||||||
|
}}</mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let element">{{
|
||||||
|
element.$vendor
|
||||||
|
}}</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="$license">
|
||||||
|
<mat-header-cell *matHeaderCellDef>{{
|
||||||
|
'APP.ABOUT.PLUGINS.LICENSE' | translate
|
||||||
|
}}</mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let element">{{
|
||||||
|
element.$license
|
||||||
|
}}</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="$runtime">
|
||||||
|
<mat-header-cell *matHeaderCellDef>{{
|
||||||
|
'APP.ABOUT.PLUGINS.RUNTIME' | translate
|
||||||
|
}}</mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let element">{{
|
||||||
|
element.$runtime
|
||||||
|
}}</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="$description">
|
||||||
|
<mat-header-cell *matHeaderCellDef>{{
|
||||||
|
'APP.ABOUT.PLUGINS.DESCRIPTION' | translate
|
||||||
|
}}</mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let element">{{
|
||||||
|
element.$description
|
||||||
|
}}</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<mat-header-row
|
||||||
|
*matHeaderRowDef="extensionColumns"
|
||||||
|
></mat-header-row>
|
||||||
|
<mat-row *matRowDef="let row; columns: extensionColumns"></mat-row>
|
||||||
|
</mat-table>
|
||||||
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<article class="padding-top-bottom" *ngIf="license">
|
<article *ngIf="repository">
|
||||||
<header class="header padding-left-right">License</header>
|
<header>Alfresco Content Services</header>
|
||||||
|
<p>
|
||||||
|
{{ 'APP.ABOUT.VERSION' | translate }} {{ repository.edition }}
|
||||||
|
{{ repository.version.display }}
|
||||||
|
</p>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<article *ngIf="license">
|
||||||
|
<header>{{ 'APP.ABOUT.LICENSE.TITLE' | translate }}</header>
|
||||||
<adf-datatable [data]="license"></adf-datatable>
|
<adf-datatable [data]="license"></adf-datatable>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<article class="padding-top-bottom">
|
<article>
|
||||||
<header class="header padding-left-right">Status</header>
|
<header>{{ 'APP.ABOUT.STATUS.TITLE' | translate }}</header>
|
||||||
<adf-datatable [data]="status"></adf-datatable>
|
<adf-datatable [data]="status"></adf-datatable>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<article class="padding-top-bottom">
|
<article>
|
||||||
<header class="header padding-left-right">Modules</header>
|
<header>{{ 'APP.ABOUT.MODULES.TITLE' | translate }}</header>
|
||||||
<adf-datatable [data]="modules"></adf-datatable>
|
<adf-datatable [data]="modules"></adf-datatable>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<article>
|
<article>
|
||||||
<header class="header padding-left-right">Packages</header>
|
<header>{{ 'APP.ABOUT.PACKAGES.TITLE' | translate }}</header>
|
||||||
<small class="padding-left-right">Current project is using the following ADF libraries:</small>
|
<mat-table [dataSource]="dependencyEntries">
|
||||||
<adf-datatable [data]="data"></adf-datatable>
|
<ng-container matColumnDef="name">
|
||||||
|
<mat-header-cell *matHeaderCellDef>{{
|
||||||
|
'APP.ABOUT.PACKAGES.NAME' | translate
|
||||||
|
}}</mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let element">{{ element.name }}</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="version">
|
||||||
|
<mat-header-cell *matHeaderCellDef>{{
|
||||||
|
'APP.ABOUT.PACKAGES.VERSION' | translate
|
||||||
|
}}</mat-header-cell>
|
||||||
|
<mat-cell *matCellDef="let element">{{ element.version }}</mat-cell>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<mat-header-row *matHeaderRowDef="dependencyColumns"></mat-header-row>
|
||||||
|
<mat-row *matRowDef="let row; columns: dependencyColumns"></mat-row>
|
||||||
|
</mat-table>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
</app-page-layout-content>
|
</app-page-layout-content>
|
||||||
|
|
||||||
</app-page-layout>
|
</app-page-layout>
|
||||||
|
@ -1,39 +1,29 @@
|
|||||||
@mixin aca-about-component-theme($theme) {
|
@mixin aca-about-component-theme($theme) {
|
||||||
$foreground: map-get($theme, foreground);
|
$foreground: map-get($theme, foreground);
|
||||||
|
|
||||||
article {
|
.app-about {
|
||||||
color: mat-color($foreground, text, 0.54);
|
.main-content {
|
||||||
}
|
padding: 10px;
|
||||||
|
|
||||||
article:first-of-type {
|
article {
|
||||||
padding-bottom: 0;
|
color: mat-color($foreground, text, 0.54);
|
||||||
}
|
padding: 25px 0 25px 0;
|
||||||
|
|
||||||
article:last-of-type {
|
& > header {
|
||||||
margin-bottom: 50px;
|
line-height: 24px;
|
||||||
}
|
font-size: 14px;
|
||||||
|
font-weight: 800;
|
||||||
|
letter-spacing: -0.2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
header {
|
article:first-of-type {
|
||||||
line-height: 24px;
|
padding-bottom: 0;
|
||||||
font-size: 14px;
|
}
|
||||||
font-weight: 800;
|
|
||||||
letter-spacing: -0.2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
article:last-of-type {
|
||||||
text-decoration: none;
|
margin-bottom: 50px;
|
||||||
color: mat-color($foreground, text, 0.87);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.padding {
|
|
||||||
padding: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.padding-top-bottom {
|
|
||||||
padding: 25px 0 25px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.padding-left-right {
|
|
||||||
padding: 0 25px 0 25px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,31 +23,57 @@
|
|||||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
import { HttpClient } from '@angular/common/http';
|
|
||||||
import { ObjectDataTableAdapter } from '@alfresco/adf-core';
|
import { ObjectDataTableAdapter } from '@alfresco/adf-core';
|
||||||
import { ContentApiService } from '../../services/content-api.service';
|
import { ExtensionRef } from '@alfresco/adf-extensions';
|
||||||
|
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||||
import { RepositoryInfo } from 'alfresco-js-api';
|
import { RepositoryInfo } from 'alfresco-js-api';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
|
import { AppExtensionService } from '../../extensions/extension.service';
|
||||||
|
import { ContentApiService } from '../../services/content-api.service';
|
||||||
|
import { version, dependencies } from '../../../../package.json';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-about',
|
selector: 'app-about',
|
||||||
templateUrl: './about.component.html'
|
templateUrl: './about.component.html',
|
||||||
|
encapsulation: ViewEncapsulation.None,
|
||||||
|
host: { class: 'app-about' }
|
||||||
})
|
})
|
||||||
export class AboutComponent implements OnInit {
|
export class AboutComponent implements OnInit {
|
||||||
repository: RepositoryInfo;
|
repository: RepositoryInfo;
|
||||||
data: ObjectDataTableAdapter;
|
|
||||||
status: ObjectDataTableAdapter;
|
status: ObjectDataTableAdapter;
|
||||||
license: ObjectDataTableAdapter;
|
license: ObjectDataTableAdapter;
|
||||||
modules: ObjectDataTableAdapter;
|
modules: ObjectDataTableAdapter;
|
||||||
releaseVersion = '';
|
releaseVersion = version;
|
||||||
|
|
||||||
|
extensionColumns: string[] = [
|
||||||
|
'$id',
|
||||||
|
'$name',
|
||||||
|
'$version',
|
||||||
|
'$vendor',
|
||||||
|
'$license',
|
||||||
|
'$runtime',
|
||||||
|
'$description'
|
||||||
|
];
|
||||||
|
extensions$: Observable<ExtensionRef[]>;
|
||||||
|
|
||||||
|
dependencyColumns: string[] = ['name', 'version'];
|
||||||
|
dependencyEntries: Array<{ name: string; version: string }> = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private contentApi: ContentApiService,
|
private contentApi: ContentApiService,
|
||||||
private http: HttpClient
|
appExtensions: AppExtensionService
|
||||||
) {}
|
) {
|
||||||
|
this.extensions$ = appExtensions.references$;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.dependencyEntries = Object.keys(dependencies).map(key => {
|
||||||
|
return {
|
||||||
|
name: key,
|
||||||
|
version: dependencies[key]
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
this.contentApi
|
this.contentApi
|
||||||
.getRepositoryInformation()
|
.getRepositoryInformation()
|
||||||
.pipe(map(node => node.entry.repository))
|
.pipe(map(node => node.entry.repository))
|
||||||
@ -159,28 +185,5 @@ export class AboutComponent implements OnInit {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.http.get('/versions.json').subscribe((response: any) => {
|
|
||||||
const regexp = new RegExp('^(@alfresco|alfresco-)');
|
|
||||||
|
|
||||||
const alfrescoPackagesTableRepresentation = Object.keys(
|
|
||||||
response.dependencies
|
|
||||||
)
|
|
||||||
.filter(val => regexp.test(val))
|
|
||||||
.map(val => ({
|
|
||||||
name: val,
|
|
||||||
version: response.dependencies[val].version
|
|
||||||
}));
|
|
||||||
|
|
||||||
this.data = new ObjectDataTableAdapter(
|
|
||||||
alfrescoPackagesTableRepresentation,
|
|
||||||
[
|
|
||||||
{ type: 'text', key: 'name', title: 'Name', sortable: true },
|
|
||||||
{ type: 'text', key: 'version', title: 'Version', sortable: true }
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
this.releaseVersion = response.version;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ import { AboutComponent } from './about.component';
|
|||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { CoreModule } from '@alfresco/adf-core';
|
import { CoreModule } from '@alfresco/adf-core';
|
||||||
import { AppLayoutModule } from '../layout/layout.module';
|
import { AppLayoutModule } from '../layout/layout.module';
|
||||||
|
import { MatTableModule } from '@angular/material';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
@ -45,7 +46,8 @@ const routes: Routes = [
|
|||||||
CommonModule,
|
CommonModule,
|
||||||
CoreModule.forChild(),
|
CoreModule.forChild(),
|
||||||
RouterModule.forChild(routes),
|
RouterModule.forChild(routes),
|
||||||
AppLayoutModule
|
AppLayoutModule,
|
||||||
|
MatTableModule
|
||||||
],
|
],
|
||||||
declarations: [AboutComponent]
|
declarations: [AboutComponent]
|
||||||
})
|
})
|
||||||
|
@ -23,8 +23,7 @@
|
|||||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { RuleContext } from '@alfresco/adf-extensions';
|
import { RuleContext, RepositoryState } from '@alfresco/adf-extensions';
|
||||||
import { RepositoryState } from '../store/states';
|
|
||||||
|
|
||||||
export interface AppRuleContext extends RuleContext {
|
export interface AppRuleContext extends RuleContext {
|
||||||
repository: RepositoryState;
|
repository: RepositoryState;
|
||||||
|
@ -110,8 +110,12 @@ describe('AppExtensionService', () => {
|
|||||||
describe('actions', () => {
|
describe('actions', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
applyConfig({
|
applyConfig({
|
||||||
|
$id: 'test',
|
||||||
$name: 'test',
|
$name: 'test',
|
||||||
$version: '1.0.0',
|
$version: '1.0.0',
|
||||||
|
$license: 'MIT',
|
||||||
|
$vendor: 'Good company',
|
||||||
|
$runtime: '1.5.0',
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
id: 'aca:actions/create-folder',
|
id: 'aca:actions/create-folder',
|
||||||
@ -242,8 +246,12 @@ describe('AppExtensionService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
applyConfig({
|
applyConfig({
|
||||||
|
$id: 'test',
|
||||||
$name: 'test',
|
$name: 'test',
|
||||||
$version: '1.0.0',
|
$version: '1.0.0',
|
||||||
|
$license: 'MIT',
|
||||||
|
$vendor: 'Good company',
|
||||||
|
$runtime: '1.5.0',
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
id: 'aca:routes/about',
|
id: 'aca:routes/about',
|
||||||
@ -301,8 +309,12 @@ describe('AppExtensionService', () => {
|
|||||||
describe('content actions', () => {
|
describe('content actions', () => {
|
||||||
it('should load content actions from the config', () => {
|
it('should load content actions from the config', () => {
|
||||||
applyConfig({
|
applyConfig({
|
||||||
|
$id: 'test',
|
||||||
$name: 'test',
|
$name: 'test',
|
||||||
$version: '1.0.0',
|
$version: '1.0.0',
|
||||||
|
$license: 'MIT',
|
||||||
|
$vendor: 'Good company',
|
||||||
|
$runtime: '1.5.0',
|
||||||
features: {
|
features: {
|
||||||
toolbar: [
|
toolbar: [
|
||||||
{
|
{
|
||||||
@ -326,8 +338,12 @@ describe('AppExtensionService', () => {
|
|||||||
|
|
||||||
it('should sort content actions by order', () => {
|
it('should sort content actions by order', () => {
|
||||||
applyConfig({
|
applyConfig({
|
||||||
|
$id: 'test',
|
||||||
$name: 'test',
|
$name: 'test',
|
||||||
$version: '1.0.0',
|
$version: '1.0.0',
|
||||||
|
$license: 'MIT',
|
||||||
|
$vendor: 'Good company',
|
||||||
|
$runtime: '1.5.0',
|
||||||
features: {
|
features: {
|
||||||
toolbar: [
|
toolbar: [
|
||||||
{
|
{
|
||||||
@ -355,8 +371,12 @@ describe('AppExtensionService', () => {
|
|||||||
describe('open with', () => {
|
describe('open with', () => {
|
||||||
it('should load [open with] actions for the viewer', () => {
|
it('should load [open with] actions for the viewer', () => {
|
||||||
applyConfig({
|
applyConfig({
|
||||||
|
$id: 'test',
|
||||||
$name: 'test',
|
$name: 'test',
|
||||||
$version: '1.0.0',
|
$version: '1.0.0',
|
||||||
|
$license: 'MIT',
|
||||||
|
$vendor: 'Good company',
|
||||||
|
$runtime: '1.5.0',
|
||||||
features: {
|
features: {
|
||||||
viewer: {
|
viewer: {
|
||||||
openWith: [
|
openWith: [
|
||||||
@ -381,8 +401,12 @@ describe('AppExtensionService', () => {
|
|||||||
|
|
||||||
it('should load only enabled [open with] actions for the viewer', () => {
|
it('should load only enabled [open with] actions for the viewer', () => {
|
||||||
applyConfig({
|
applyConfig({
|
||||||
|
$id: 'test',
|
||||||
$name: 'test',
|
$name: 'test',
|
||||||
$version: '1.0.0',
|
$version: '1.0.0',
|
||||||
|
$license: 'MIT',
|
||||||
|
$vendor: 'Good company',
|
||||||
|
$runtime: '1.5.0',
|
||||||
features: {
|
features: {
|
||||||
viewer: {
|
viewer: {
|
||||||
openWith: [
|
openWith: [
|
||||||
@ -418,8 +442,12 @@ describe('AppExtensionService', () => {
|
|||||||
|
|
||||||
it('should sort [open with] actions by order', () => {
|
it('should sort [open with] actions by order', () => {
|
||||||
applyConfig({
|
applyConfig({
|
||||||
|
$id: 'test',
|
||||||
$name: 'test',
|
$name: 'test',
|
||||||
$version: '1.0.0',
|
$version: '1.0.0',
|
||||||
|
$license: 'MIT',
|
||||||
|
$vendor: 'Good company',
|
||||||
|
$runtime: '1.5.0',
|
||||||
features: {
|
features: {
|
||||||
viewer: {
|
viewer: {
|
||||||
openWith: [
|
openWith: [
|
||||||
@ -457,8 +485,12 @@ describe('AppExtensionService', () => {
|
|||||||
describe('create', () => {
|
describe('create', () => {
|
||||||
it('should load [create] actions from config', () => {
|
it('should load [create] actions from config', () => {
|
||||||
applyConfig({
|
applyConfig({
|
||||||
|
$id: 'test',
|
||||||
$name: 'test',
|
$name: 'test',
|
||||||
$version: '1.0.0',
|
$version: '1.0.0',
|
||||||
|
$license: 'MIT',
|
||||||
|
$vendor: 'Good company',
|
||||||
|
$runtime: '1.5.0',
|
||||||
features: {
|
features: {
|
||||||
create: [
|
create: [
|
||||||
{
|
{
|
||||||
@ -477,8 +509,12 @@ describe('AppExtensionService', () => {
|
|||||||
|
|
||||||
it('should sort [create] actions by order', () => {
|
it('should sort [create] actions by order', () => {
|
||||||
applyConfig({
|
applyConfig({
|
||||||
|
$id: 'test',
|
||||||
$name: 'test',
|
$name: 'test',
|
||||||
$version: '1.0.0',
|
$version: '1.0.0',
|
||||||
|
$license: 'MIT',
|
||||||
|
$vendor: 'Good company',
|
||||||
|
$runtime: '1.5.0',
|
||||||
features: {
|
features: {
|
||||||
create: [
|
create: [
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
import { Injectable, Type } from '@angular/core';
|
import { Injectable, Type } from '@angular/core';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { Route } from '@angular/router';
|
import { Route } from '@angular/router';
|
||||||
import { AppStore, RepositoryState } from '../store/states';
|
import { AppStore } from '../store/states';
|
||||||
import { ruleContext } from '../store/selectors/app.selectors';
|
import { ruleContext } from '../store/selectors/app.selectors';
|
||||||
import { NodePermissionService } from '../services/node-permission.service';
|
import { NodePermissionService } from '../services/node-permission.service';
|
||||||
import {
|
import {
|
||||||
@ -46,15 +46,20 @@ import {
|
|||||||
reduceEmptyMenus,
|
reduceEmptyMenus,
|
||||||
ExtensionService,
|
ExtensionService,
|
||||||
ProfileState,
|
ProfileState,
|
||||||
mergeObjects
|
mergeObjects,
|
||||||
|
RepositoryState,
|
||||||
|
ExtensionRef
|
||||||
} from '@alfresco/adf-extensions';
|
} from '@alfresco/adf-extensions';
|
||||||
import { AppConfigService } from '@alfresco/adf-core';
|
import { AppConfigService } from '@alfresco/adf-core';
|
||||||
import { DocumentListPresetRef } from './document-list.extensions';
|
import { DocumentListPresetRef } from './document-list.extensions';
|
||||||
|
import { BehaviorSubject, Observable } from 'rxjs';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class AppExtensionService implements RuleContext {
|
export class AppExtensionService implements RuleContext {
|
||||||
|
private _references = new BehaviorSubject<ExtensionRef[]>([]);
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
layout: 'app.layout.main',
|
layout: 'app.layout.main',
|
||||||
auth: ['app.auth']
|
auth: ['app.auth']
|
||||||
@ -97,6 +102,8 @@ export class AppExtensionService implements RuleContext {
|
|||||||
profile: ProfileState;
|
profile: ProfileState;
|
||||||
repository: RepositoryState;
|
repository: RepositoryState;
|
||||||
|
|
||||||
|
references$: Observable<ExtensionRef[]>;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private store: Store<AppStore>,
|
private store: Store<AppStore>,
|
||||||
private loader: ExtensionLoaderService,
|
private loader: ExtensionLoaderService,
|
||||||
@ -104,6 +111,8 @@ export class AppExtensionService implements RuleContext {
|
|||||||
public permissions: NodePermissionService,
|
public permissions: NodePermissionService,
|
||||||
private appConfig: AppConfigService
|
private appConfig: AppConfigService
|
||||||
) {
|
) {
|
||||||
|
this.references$ = this._references.asObservable();
|
||||||
|
|
||||||
this.store.select(ruleContext).subscribe(result => {
|
this.store.select(ruleContext).subscribe(result => {
|
||||||
this.selection = result.selection;
|
this.selection = result.selection;
|
||||||
this.navigation = result.navigation;
|
this.navigation = result.navigation;
|
||||||
@ -174,6 +183,11 @@ export class AppExtensionService implements RuleContext {
|
|||||||
trashcan: this.getDocumentListPreset(config, 'trashcan'),
|
trashcan: this.getDocumentListPreset(config, 'trashcan'),
|
||||||
searchLibraries: this.getDocumentListPreset(config, 'search-libraries')
|
searchLibraries: this.getDocumentListPreset(config, 'search-libraries')
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const references = (config.$references || [])
|
||||||
|
.filter(entry => typeof entry === 'object')
|
||||||
|
.map(entry => <ExtensionRef>entry);
|
||||||
|
this._references.next(references);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected loadNavBar(config: ExtensionConfig): Array<NavBarGroupRef> {
|
protected loadNavBar(config: ExtensionConfig): Array<NavBarGroupRef> {
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
import { RepositoryState } from '../states';
|
import { RepositoryState } from '@alfresco/adf-extensions';
|
||||||
|
|
||||||
export const SET_REPOSITORY_STATUS = 'SET_REPOSITORY_STATUS';
|
export const SET_REPOSITORY_STATUS = 'SET_REPOSITORY_STATUS';
|
||||||
export const GET_REPOSITORY_STATUS = 'GET_REPOSITORY_STATUS';
|
export const GET_REPOSITORY_STATUS = 'GET_REPOSITORY_STATUS';
|
||||||
|
@ -24,4 +24,3 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export * from './states/app.state';
|
export * from './states/app.state';
|
||||||
export * from './states/repository.state';
|
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
import {
|
import {
|
||||||
SelectionState,
|
SelectionState,
|
||||||
ProfileState,
|
ProfileState,
|
||||||
NavigationState
|
NavigationState,
|
||||||
|
RepositoryState
|
||||||
} from '@alfresco/adf-extensions';
|
} from '@alfresco/adf-extensions';
|
||||||
import { RepositoryState } from '../states';
|
|
||||||
|
|
||||||
export interface AppState {
|
export interface AppState {
|
||||||
appName: string;
|
appName: string;
|
||||||
|
@ -1,31 +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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface RepositoryState {
|
|
||||||
isAuditEnabled?: boolean;
|
|
||||||
isQuickShareEnabled?: boolean;
|
|
||||||
isReadOnly?: boolean;
|
|
||||||
isThumbnailGenerationEnabled?: boolean;
|
|
||||||
}
|
|
@ -1,7 +1,12 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../../extension.schema.json",
|
"$schema": "../../extension.schema.json",
|
||||||
"$name": "app",
|
"$id": "app.core",
|
||||||
|
"$name": "app.core",
|
||||||
"$version": "1.0.0",
|
"$version": "1.0.0",
|
||||||
|
"$vendor": "Alfresco Software, Ltd.",
|
||||||
|
"$license": "LGPL-3.0",
|
||||||
|
"$runtime": "1.5.0",
|
||||||
|
"$description": "Core application extensions and features",
|
||||||
"$references": [],
|
"$references": [],
|
||||||
|
|
||||||
"rules": [
|
"rules": [
|
||||||
|
@ -1,5 +1,32 @@
|
|||||||
{
|
{
|
||||||
"APP": {
|
"APP": {
|
||||||
|
"ABOUT": {
|
||||||
|
"VERSION": "Version:",
|
||||||
|
"PLUGINS": {
|
||||||
|
"TITLE": "Plugins",
|
||||||
|
"ID": "ID",
|
||||||
|
"NAME": "Name",
|
||||||
|
"VERSION": "Version",
|
||||||
|
"VENDOR": "Vendor",
|
||||||
|
"LICENSE": "License",
|
||||||
|
"RUNTIME": "Runtime",
|
||||||
|
"DESCRIPTION": "Description"
|
||||||
|
},
|
||||||
|
"LICENSE": {
|
||||||
|
"TITLE": "License"
|
||||||
|
},
|
||||||
|
"STATUS": {
|
||||||
|
"TITLE": "Status"
|
||||||
|
},
|
||||||
|
"MODULES": {
|
||||||
|
"TITLE": "Modules"
|
||||||
|
},
|
||||||
|
"PACKAGES": {
|
||||||
|
"TITLE": "Packages",
|
||||||
|
"NAME": "Name",
|
||||||
|
"VERSION": "Version"
|
||||||
|
}
|
||||||
|
},
|
||||||
"LANGUAGE": "Language",
|
"LANGUAGE": "Language",
|
||||||
"SIGN_IN": "Sign in",
|
"SIGN_IN": "Sign in",
|
||||||
"SIGN_OUT": "Sign out",
|
"SIGN_OUT": "Sign out",
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../../../extension.schema.json",
|
"$schema": "../../../extension.schema.json",
|
||||||
|
"$id": "app.demo.cardView",
|
||||||
"$name": "app.demo.cardView",
|
"$name": "app.demo.cardView",
|
||||||
"$version": "1.0.0",
|
"$version": "1.0.0",
|
||||||
|
"$vendor": "Alfresco Software, Ltd.",
|
||||||
|
"$license": "LGPL-3.0",
|
||||||
|
"$runtime": "1.5.0",
|
||||||
|
"$description": "Simple extension that provides Card View toolbar button",
|
||||||
|
|
||||||
"features": {
|
"features": {
|
||||||
"toolbar": [
|
"toolbar": [
|
@ -1,8 +1,12 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../../../extension.schema.json",
|
"$schema": "../../../extension.schema.json",
|
||||||
"$name": "app.create",
|
"$id": "app.demo.create",
|
||||||
|
"$name": "app.demo.create",
|
||||||
"$version": "1.0.0",
|
"$version": "1.0.0",
|
||||||
|
"$vendor": "Alfresco Software, Ltd.",
|
||||||
|
"$license": "LGPL-3.0",
|
||||||
|
"$runtime": "1.5.0",
|
||||||
|
"$description": "Simple extension that provides custom entries for Create menu",
|
||||||
|
|
||||||
"features": {
|
"features": {
|
||||||
"create": [
|
"create": [
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../../../extension.schema.json",
|
"$schema": "../../../extension.schema.json",
|
||||||
|
"$id": "app.debug.plugin",
|
||||||
"$version": "1.0.0",
|
"$version": "1.0.0",
|
||||||
"$name": "plugin1",
|
"$name": "app.debug.plugin",
|
||||||
"$description": "demo plugin",
|
"$vendor": "Alfresco Software, Ltd.",
|
||||||
|
"$license": "LGPL-3.0",
|
||||||
|
"$runtime": "1.5.0",
|
||||||
|
"$description": "Plugin for debugging and testing purposes",
|
||||||
|
|
||||||
"actions": [
|
"actions": [
|
||||||
{
|
{
|
@ -1,7 +1,12 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../../../extension.schema.json",
|
"$schema": "../../../extension.schema.json",
|
||||||
"$name": "app",
|
"$id": "app.demo.header",
|
||||||
|
"$name": "app.demo.header",
|
||||||
"$version": "1.0.0",
|
"$version": "1.0.0",
|
||||||
|
"$vendor": "Alfresco Software, Ltd.",
|
||||||
|
"$license": "LGPL-3.0",
|
||||||
|
"$runtime": "1.5.0",
|
||||||
|
"$description": "Sample app header extension",
|
||||||
|
|
||||||
"actions": [
|
"actions": [
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../../../extension.schema.json",
|
"$schema": "../../../extension.schema.json",
|
||||||
"$version": "1.0.0",
|
"$id": "app.demo.metadata",
|
||||||
"$name": "metadata-plugin",
|
"$name": "metadata-plugin",
|
||||||
|
"$version": "1.0.0",
|
||||||
|
"$vendor": "Alfresco Software, Ltd.",
|
||||||
|
"$license": "LGPL-3.0",
|
||||||
|
"$runtime": "1.5.0",
|
||||||
"$description": "metadata card configuration plugin - testing purpose",
|
"$description": "metadata card configuration plugin - testing purpose",
|
||||||
|
|
||||||
"features": {
|
"features": {
|
||||||
"content-metadata-presets": [
|
"content-metadata-presets": [
|
||||||
{
|
{
|
5783
src/versions.json
Normal file
5783
src/versions.json
Normal file
File diff suppressed because one or more lines are too long
@ -13,7 +13,8 @@
|
|||||||
"lib": ["es2018", "dom"],
|
"lib": ["es2018", "dom"],
|
||||||
"module": "es2015",
|
"module": "es2015",
|
||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
"paths": {}
|
"paths": {},
|
||||||
|
"resolveJsonModule": true
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules"],
|
"exclude": ["node_modules"],
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user