[ADF-4125] simplify extension load in extension module (#4214)

* add extension load in extension module

* add viewer extensions

* fix license header

* fix node passed in the viewer extension

* fix node passed in the viewer extension

* startup factory extension

* startup factory extension

* fix script

* fix beta tag build

* fix build

* fix build

* refactoring configuration files

* extension using map

* fix build

* fix config

* fix test

* fix test
This commit is contained in:
Eugenio Romano
2019-02-22 14:19:41 +00:00
committed by GitHub
parent bf4d1a2806
commit bda7e07b52
92 changed files with 1035 additions and 785 deletions

View File

@@ -15,6 +15,7 @@ branches:
only: only:
- master - master
- development - development
- /.*beta.*/
# TRAVIS_PULL_REQUEST == false means is running on dev branch and is not a PR # TRAVIS_PULL_REQUEST == false means is running on dev branch and is not a PR
stages: stages:
@@ -62,7 +63,7 @@ jobs:
- stage: Unit test - stage: Unit test
name: core name: core
script: script:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -b $TRAVIS_BRANCH)"; AFFECTED_LIBS="$(./scripts/affected-libs.sh -b -gnu $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "core$" || $TRAVIS_PULL_REQUEST == "false" ]]; if [[ $AFFECTED_LIBS =~ "core$" || $TRAVIS_PULL_REQUEST == "false" ]];
then then
ng test core --watch=false || exit 1; ng test core --watch=false || exit 1;
@@ -70,7 +71,7 @@ jobs:
- stage: Unit test - stage: Unit test
name: extensions name: extensions
script: script:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -b $TRAVIS_BRANCH)"; AFFECTED_LIBS="$(./scripts/affected-libs.sh -b -gnu $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "extensions$" || $TRAVIS_PULL_REQUEST == "false" ]]; if [[ $AFFECTED_LIBS =~ "extensions$" || $TRAVIS_PULL_REQUEST == "false" ]];
then then
ng test extensions --watch=false || exit 1; ng test extensions --watch=false || exit 1;
@@ -78,7 +79,7 @@ jobs:
- stage: Unit test - stage: Unit test
name: process-services name: process-services
script: script:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -b $TRAVIS_BRANCH)"; AFFECTED_LIBS="$(./scripts/affected-libs.sh -b -gnu $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "process-services$" || $TRAVIS_PULL_REQUEST == "false" ]]; if [[ $AFFECTED_LIBS =~ "process-services$" || $TRAVIS_PULL_REQUEST == "false" ]];
then then
ng test process-services --watch=false || exit 1; ng test process-services --watch=false || exit 1;
@@ -86,7 +87,7 @@ jobs:
- stage: Unit test - stage: Unit test
name: insights name: insights
script: script:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -b $TRAVIS_BRANCH)"; AFFECTED_LIBS="$(./scripts/affected-libs.sh -b -gnu $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "insights$" || $TRAVIS_PULL_REQUEST == "false" ]]; if [[ $AFFECTED_LIBS =~ "insights$" || $TRAVIS_PULL_REQUEST == "false" ]];
then then
ng test insights --watch=false || exit 1; ng test insights --watch=false || exit 1;
@@ -94,7 +95,7 @@ jobs:
- stage: Unit test - stage: Unit test
name: content-services name: content-services
script: script:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -b $TRAVIS_BRANCH)"; AFFECTED_LIBS="$(./scripts/affected-libs.sh -b -gnu $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "content-services$" || $TRAVIS_PULL_REQUEST == "false" ]]; if [[ $AFFECTED_LIBS =~ "content-services$" || $TRAVIS_PULL_REQUEST == "false" ]];
then then
ng test content-services --watch=false || exit 1; ng test content-services --watch=false || exit 1;
@@ -102,7 +103,7 @@ jobs:
- stage: Unit test - stage: Unit test
name: process-services-cloud name: process-services-cloud
script: script:
AFFECTED_LIBS="$(./scripts/affected-libs.sh -b $TRAVIS_BRANCH)"; AFFECTED_LIBS="$(./scripts/affected-libs.sh -b -gnu $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $TRAVIS_PULL_REQUEST == "false" ]]; if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $TRAVIS_PULL_REQUEST == "false" ]];
then then
ng test process-services-cloud --watch=false || exit 1; ng test process-services-cloud --watch=false || exit 1;
@@ -133,7 +134,7 @@ jobs:
name: core name: core
script: script:
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")"; AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
AFFECTED_LIBS="$(./scripts/affected-libs.sh -b $TRAVIS_BRANCH)"; AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "core$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]]; if [[ $AFFECTED_LIBS =~ "core$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then then
(./scripts/test-e2e-lib.sh -host localhost:4200 --host_sso "$E2E_HOST_SSO" --host_bpm "$E2E_HOST_BPM" --host_identity "$E2E_HOST_IDENTITY" -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder core --skip-lint --use-dist || exit 1;); (./scripts/test-e2e-lib.sh -host localhost:4200 --host_sso "$E2E_HOST_SSO" --host_bpm "$E2E_HOST_BPM" --host_identity "$E2E_HOST_IDENTITY" -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder core --skip-lint --use-dist || exit 1;);
@@ -142,7 +143,7 @@ jobs:
name: process-services name: process-services
script: script:
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")"; AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
AFFECTED_LIBS="$(./scripts/affected-libs.sh -b $TRAVIS_BRANCH)"; AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "process-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]]; if [[ $AFFECTED_LIBS =~ "process-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then then
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder process-services --skip-lint --use-dist || exit 1;); (./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder process-services --skip-lint --use-dist || exit 1;);
@@ -151,7 +152,7 @@ jobs:
name: content-services name: content-services
script: script:
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")"; AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
AFFECTED_LIBS="$(./scripts/affected-libs.sh -b $TRAVIS_BRANCH)"; AFFECTED_LIBS="$(./scripts/affected-libs.sh -gnu -b $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "content-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]]; if [[ $AFFECTED_LIBS =~ "content-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then then
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder content-services --skip-lint --use-dist || exit 1;); (./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder content-services --skip-lint --use-dist || exit 1;);
@@ -160,7 +161,7 @@ jobs:
name: search name: search
script: script:
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")"; AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
AFFECTED_LIBS="$(./scripts/affected-libs.sh -b $TRAVIS_BRANCH)"; AFFECTED_LIBS="$(./scripts/affected-libs.sh -b -gnu $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "content-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]]; if [[ $AFFECTED_LIBS =~ "content-services$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then then
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder search --skip-lint --use-dist || exit 1;); (./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder search --skip-lint --use-dist || exit 1;);
@@ -169,7 +170,7 @@ jobs:
name: process-services-cloud name: process-services-cloud
script: script:
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")"; AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
AFFECTED_LIBS="$(./scripts/affected-libs.sh -b $TRAVIS_BRANCH)"; AFFECTED_LIBS="$(./scripts/affected-libs.sh -b -gnu $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]]; if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then then
(./scripts/test-e2e-lib.sh -host localhost:4200 --host_sso "$E2E_HOST_SSO" --host_bpm "$E2E_HOST_BPM" --host_identity "$E2E_HOST_IDENTITY" -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder process-services-cloud --skip-lint --use-dist || exit 1;); (./scripts/test-e2e-lib.sh -host localhost:4200 --host_sso "$E2E_HOST_SSO" --host_bpm "$E2E_HOST_BPM" --host_identity "$E2E_HOST_IDENTITY" -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder process-services-cloud --skip-lint --use-dist || exit 1;);
@@ -178,7 +179,7 @@ jobs:
name: insights name: insights
script: script:
AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")"; AFFECTED_E2E="$(./scripts/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e")";
AFFECTED_LIBS="$(./scripts/affected-libs.sh -b $TRAVIS_BRANCH)"; AFFECTED_LIBS="$(./scripts/affected-libs.sh -b -gnu $TRAVIS_BRANCH)";
if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]]; if [[ $AFFECTED_LIBS =~ "process-services-cloud$" || $AFFECTED_E2E = "e2e" || $TRAVIS_PULL_REQUEST == "false" ]];
then then
(./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder insights --skip-lint --use-dist || exit 1;); (./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b --folder insights --skip-lint --use-dist || exit 1;);

View File

@@ -540,7 +540,7 @@
"build": { "build": {
"builder": "@angular-devkit/build-ng-packagr:build", "builder": "@angular-devkit/build-ng-packagr:build",
"options": { "options": {
"tsConfig": "lib/core/tsconfig.json", "tsConfig": "lib/core/tsconfig.lib.json",
"project": "lib/core/ng-package.json" "project": "lib/core/ng-package.json"
}, },
"configurations": { "configurations": {
@@ -553,7 +553,7 @@
"builder": "@angular-devkit/build-angular:karma", "builder": "@angular-devkit/build-angular:karma",
"options": { "options": {
"main": "lib/core/test.ts", "main": "lib/core/test.ts",
"tsConfig": "lib/core/tsconfig.json", "tsConfig": "lib/core/tsconfig.spec.json",
"karmaConfig": "lib/core/karma.conf.js", "karmaConfig": "lib/core/karma.conf.js",
"codeCoverage": true, "codeCoverage": true,
"sourceMap": true "sourceMap": true
@@ -582,7 +582,7 @@
"build": { "build": {
"builder": "@angular-devkit/build-ng-packagr:build", "builder": "@angular-devkit/build-ng-packagr:build",
"options": { "options": {
"tsConfig": "lib/content-services/tsconfig.json", "tsConfig": "lib/content-services/tsconfig.lib.json",
"project": "lib/content-services/ng-package.json" "project": "lib/content-services/ng-package.json"
}, },
"configurations": { "configurations": {
@@ -595,7 +595,7 @@
"builder": "@angular-devkit/build-angular:karma", "builder": "@angular-devkit/build-angular:karma",
"options": { "options": {
"main": "lib/content-services/test.ts", "main": "lib/content-services/test.ts",
"tsConfig": "lib/content-services/tsconfig.json", "tsConfig": "lib/content-services/tsconfig.spec.json",
"karmaConfig": "lib/content-services/karma.conf.js", "karmaConfig": "lib/content-services/karma.conf.js",
"codeCoverage": true, "codeCoverage": true,
"sourceMap": true "sourceMap": true
@@ -624,7 +624,7 @@
"build": { "build": {
"builder": "@angular-devkit/build-ng-packagr:build", "builder": "@angular-devkit/build-ng-packagr:build",
"options": { "options": {
"tsConfig": "lib/process-services/tsconfig.json", "tsConfig": "lib/process-services/tsconfig.lib.json",
"project": "lib/process-services/ng-package.json" "project": "lib/process-services/ng-package.json"
}, },
"configurations": { "configurations": {
@@ -637,7 +637,7 @@
"builder": "@angular-devkit/build-angular:karma", "builder": "@angular-devkit/build-angular:karma",
"options": { "options": {
"main": "lib/process-services/test.ts", "main": "lib/process-services/test.ts",
"tsConfig": "lib/process-services/tsconfig.json", "tsConfig": "lib/process-services/tsconfig.spec.json",
"karmaConfig": "lib/process-services/karma.conf.js", "karmaConfig": "lib/process-services/karma.conf.js",
"codeCoverage": true, "codeCoverage": true,
"sourceMap": true "sourceMap": true
@@ -708,7 +708,7 @@
"build": { "build": {
"builder": "@angular-devkit/build-ng-packagr:build", "builder": "@angular-devkit/build-ng-packagr:build",
"options": { "options": {
"tsConfig": "lib/insights/tsconfig.json", "tsConfig": "lib/extensions/tsconfig.lib.json",
"project": "lib/insights/ng-package.json" "project": "lib/insights/ng-package.json"
}, },
"configurations": { "configurations": {
@@ -721,7 +721,7 @@
"builder": "@angular-devkit/build-angular:karma", "builder": "@angular-devkit/build-angular:karma",
"options": { "options": {
"main": "lib/insights/test.ts", "main": "lib/insights/test.ts",
"tsConfig": "lib/insights/tsconfig.json", "tsConfig": "lib/extensions/tsconfig.spec.json",
"karmaConfig": "lib/insights/karma.conf.js", "karmaConfig": "lib/insights/karma.conf.js",
"codeCoverage": true, "codeCoverage": true,
"sourceMap": true "sourceMap": true

View File

@@ -0,0 +1,27 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { NgModule } from '@angular/core';
import { AcaMonacoModule } from 'adf-monaco-extension';
@NgModule({
imports: [
AcaMonacoModule
]
})
export class AppExtensionsModule {
}

View File

@@ -24,6 +24,7 @@ import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { AppConfigService, TRANSLATION_PROVIDER, DebugAppConfigService, CoreModule } from '@alfresco/adf-core'; import { AppConfigService, TRANSLATION_PROVIDER, DebugAppConfigService, CoreModule } from '@alfresco/adf-core';
import { ExtensionsModule } from '@alfresco/adf-extensions';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { MaterialModule } from './material.module'; import { MaterialModule } from './material.module';
import { LoginComponent } from './components/login/login.component'; import { LoginComponent } from './components/login/login.component';
@@ -65,7 +66,6 @@ import { ProcessModule } from '@alfresco/adf-process-services';
import { AuthBearerInterceptor } from './services'; import { AuthBearerInterceptor } from './services';
import { ProcessServicesCloudModule, GroupCloudModule } from '@alfresco/adf-process-services-cloud'; import { ProcessServicesCloudModule, GroupCloudModule } from '@alfresco/adf-process-services-cloud';
import { TreeViewSampleComponent } from './components/tree-view/tree-view-sample.component'; import { TreeViewSampleComponent } from './components/tree-view/tree-view-sample.component';
import { AppExtensionsModule } from './extensions/extensions.module';
import { CloudLayoutComponent } from './components/app-layout/cloud/cloud-layout.component'; import { CloudLayoutComponent } from './components/app-layout/cloud/cloud-layout.component';
import { AppsCloudDemoComponent } from './components/app-layout/cloud/apps-cloud-demo.component'; import { AppsCloudDemoComponent } from './components/app-layout/cloud/apps-cloud-demo.component';
import { ProcessesCloudDemoComponent } from './components/app-layout/cloud/processes-cloud-demo.component'; import { ProcessesCloudDemoComponent } from './components/app-layout/cloud/processes-cloud-demo.component';
@@ -78,6 +78,7 @@ import { StartProcessCloudDemoComponent } from './components/app-layout/cloud/st
import { TemplateDemoComponent } from './components/template-list/template-demo.component'; import { TemplateDemoComponent } from './components/template-list/template-demo.component';
import { PeopleGroupCloudDemoComponent } from './components/app-layout/cloud/people-groups-cloud-demo.component'; import { PeopleGroupCloudDemoComponent } from './components/app-layout/cloud/people-groups-cloud-demo.component';
import { CloudSettingsComponent } from './components/app-layout/cloud/cloud-settings.component'; import { CloudSettingsComponent } from './components/app-layout/cloud/cloud-settings.component';
import { AppExtensionsModule } from './app-extension.module';
@NgModule({ @NgModule({
imports: [ imports: [
@@ -88,16 +89,18 @@ import { CloudSettingsComponent } from './components/app-layout/cloud/cloud-sett
FormsModule, FormsModule,
HttpClientModule, HttpClientModule,
MaterialModule, MaterialModule,
AppExtensionsModule,
FlexLayoutModule, FlexLayoutModule,
CoreModule.forRoot(), CoreModule.forRoot(),
ContentModule.forRoot(), ContentModule.forRoot(),
InsightsModule.forRoot(), InsightsModule.forRoot(),
ProcessModule.forRoot(), ProcessModule.forRoot(),
ProcessServicesCloudModule,
ExtensionsModule.forRoot(),
ThemePickerModule, ThemePickerModule,
ChartsModule, ChartsModule,
MonacoEditorModule.forRoot(), MonacoEditorModule.forRoot(),
ProcessServicesCloudModule, ProcessServicesCloudModule,
AppExtensionsModule.forRoot(),
GroupCloudModule GroupCloudModule
], ],
declarations: [ declarations: [

View File

@@ -16,8 +16,7 @@
*/ */
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { ExtensionRef } from '@alfresco/adf-extensions'; import { AppExtensionService, ExtensionRef } from '@alfresco/adf-extensions';
import { AppExtensionService } from '../../extensions/extension.service';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
@Component({ @Component({

View File

@@ -19,6 +19,7 @@ import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { NotificationService, AppConfigService } from '@alfresco/adf-core'; import { NotificationService, AppConfigService } from '@alfresco/adf-core';
import { CloudLayoutService } from './services/cloud-layout.service'; import { CloudLayoutService } from './services/cloud-layout.service';
@Component({ @Component({
templateUrl: './start-process-cloud-demo.component.html', templateUrl: './start-process-cloud-demo.component.html',
styleUrls: ['./start-process-cloud-demo.component.scss'] styleUrls: ['./start-process-cloud-demo.component.scss']

View File

@@ -4,7 +4,7 @@
<adf-info-drawer [title]="'APP.INFO_DRAWER.TITLE' | translate"> <adf-info-drawer [title]="'APP.INFO_DRAWER.TITLE' | translate">
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.COMMENTS' | translate"> <adf-info-drawer-tab [label]="'APP.INFO_DRAWER.COMMENTS' | translate">
<adf-comments [nodeId]="nodeId" [readOnly]="isCommentDisabled"></adf-comments> <adf-comments [nodeId]="nodeId" [readOnly]="!isCommentEnabled"></adf-comments>
</adf-info-drawer-tab> </adf-info-drawer-tab>
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.PROPERTIES' | translate"> <adf-info-drawer-tab [label]="'APP.INFO_DRAWER.PROPERTIES' | translate">

View File

@@ -1,3 +1,12 @@
.adf-viewer__sidebar { .adf-viewer__sidebar {
width: 380px !important; width: 380px !important;
} }
/* stylelint-disable */
.monaco-scrollable-element {
width: 600px;
}
adf-preview-extension {
width: 600px;
}

View File

@@ -17,7 +17,7 @@
import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { ContentService, PermissionsEnum, NodesApiService } from '@alfresco/adf-core'; import { ContentService, AllowableOperationsEnum, PermissionsEnum, NodesApiService } from '@alfresco/adf-core';
import { MatSnackBar } from '@angular/material'; import { MatSnackBar } from '@angular/material';
@Component({ @Component({
@@ -52,7 +52,7 @@ export class FileViewComponent implements OnInit {
showLeftSidebar = null; showLeftSidebar = null;
showRightSidebar = false; showRightSidebar = false;
customToolbar = false; customToolbar = false;
isCommentDisabled = false; isCommentEnabled = false;
constructor(private router: Router, constructor(private router: Router,
private route: ActivatedRoute, private route: ActivatedRoute,
@@ -68,7 +68,8 @@ export class FileViewComponent implements OnInit {
this.nodeApiService.getNode(id).subscribe( this.nodeApiService.getNode(id).subscribe(
(node) => { (node) => {
if (node && node.isFile) { if (node && node.isFile) {
this.isCommentDisabled = this.contentServices.hasPermissions(node, PermissionsEnum.CONSUMER); this.isCommentEnabled = this.contentServices.hasPermissions(node, PermissionsEnum.NOT_CONSUMER) ||
this.contentServices.hasAllowableOperations(node, AllowableOperationsEnum.UPDATE);
this.nodeId = id; this.nodeId = id;
return; return;
} }

View File

@@ -16,8 +16,7 @@
*/ */
import { Component, ViewChild } from '@angular/core'; import { Component, ViewChild } from '@angular/core';
import { FormComponent, FormModel, FormService, LogService } from '@alfresco/adf-core'; import { FormComponent, FormModel, FormService, LogService, FormOutcomeEvent } from '@alfresco/adf-core';
import { FormOutcomeEvent } from '../../../../../lib/core/form/components/widgets/core';
@Component({ @Component({
selector: 'app-form-list', selector: 'app-form-list',

View File

@@ -22,10 +22,9 @@ import {
TaskDetailsModel, TaskDetailsModel,
TaskUploadService TaskUploadService
} from '@alfresco/adf-process-services'; } from '@alfresco/adf-process-services';
import { UploadService, AlfrescoApiService, AppConfigService } from '@alfresco/adf-core'; import { UploadService, AlfrescoApiService, AppConfigService, FileUploadCompleteEvent } from '@alfresco/adf-core';
import { PreviewService } from '../../services/preview.service'; import { PreviewService } from '../../services/preview.service';
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
import { FileUploadCompleteEvent } from '../../../../../lib/core/events/file.event';
export function taskUploadServiceFactory(api: AlfrescoApiService, config: AppConfigService) { export function taskUploadServiceFactory(api: AlfrescoApiService, config: AppConfigService) {
return new TaskUploadService(api, config); return new TaskUploadService(api, config);

View File

@@ -1,51 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { NgModule, ModuleWithProviders, APP_INITIALIZER } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
import { AppExtensionService } from './extension.service';
import { ExtensionsModule } from '@alfresco/adf-extensions';
export function setupExtensions(service: AppExtensionService): Function {
return () => service.load();
}
@NgModule({
imports: [CommonModule, CoreModule.forChild(), ExtensionsModule]
})
export class AppExtensionsModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: AppExtensionsModule,
providers: [
{
provide: APP_INITIALIZER,
useFactory: setupExtensions,
deps: [AppExtensionService],
multi: true
}
]
};
}
static forChild(): ModuleWithProviders {
return {
ngModule: AppExtensionsModule
};
}
}

View File

@@ -1,15 +1,9 @@
{ {
"$schema": "./extension.schema.json", "$schema": "../../lib/extensions/config/schema/app-extension.schema.json",
"$id": "app.1.0.0",
"$name": "app",
"$version": "1.0.0",
"$vendor": "Alfresco",
"$license": "Apache-2.0",
"$runtime": "2.7.0",
"$description": "base application extensions",
"$references": [ "$references": [
"plugin1.json", "plugin1.json",
"plugin2.json" "plugin2.json",
"monaco-extension.json"
], ],
"$dependencies": [] "$dependencies": []
} }

View File

@@ -0,0 +1,17 @@
{
"$schema": "../../../lib/extensions/config/schema/plugin-extension.schema.json",
"$version": "1.0.0",
"$name": "monaco extension",
"$description": "monaco plugin",
"features": {
"viewer": {
"content": [
{
"id": "dev.tools.viewer",
"fileExtension": "js",
"component": "monaco-extension.main.component"
}
]
}
}
}

View File

@@ -1,16 +1,11 @@
{ {
"$schema": "../extension.schema.json", "$schema": "../../../lib/extensions/config/schema/plugin-extension.schema.json",
"$id": "plugin1.1.0.0",
"$name": "plugin1", "$name": "plugin1",
"$version": "1.0.0", "$version": "1.0.0",
"$vendor": "Alfresco", "$vendor": "Alfresco",
"$license": "Apache-2.0", "$license": "Apache-2.0",
"$runtime": "2.7.0", "$runtime": "2.7.0",
"$description": "example plugin", "$description": "example plugin",
"$dependencies": [
"@some/library1"
],
"features": { "features": {
"custom": { "custom": {
"key": "value" "key": "value"

View File

@@ -1,16 +1,11 @@
{ {
"$schema": "../extension.schema.json", "$schema": "../../../lib/extensions/config/schema/plugin-extension.schema.json",
"$id": "plugin2.1.1.0",
"$name": "plugin2", "$name": "plugin2",
"$version": "1.1.0", "$version": "1.1.0",
"$vendor": "Alfresco", "$vendor": "Alfresco",
"$license": "Apache-2.0", "$license": "Apache-2.0",
"$runtime": "2.7.0", "$runtime": "2.7.0",
"$description": "another example plugin", "$description": "another example plugin",
"$dependencies": [
"@some/library2"
],
"features": { "features": {
"extra": { "extra": {
"key": "value" "key": "value"

View File

@@ -4,30 +4,7 @@
"outDir": "../out-tsc/app", "outDir": "../out-tsc/app",
"module": "es2015", "module": "es2015",
"baseUrl": ".", "baseUrl": ".",
"types": [], "types": []
"paths": {
"@alfresco/adf-extensions": [
"../../lib/extensions"
],
"@alfresco/adf-core": [
"../../lib/core"
],
"@alfresco/adf-process-services-cloud": [
"../../lib/process-services-cloud"
],
"@alfresco/adf-testing": [
"../../lib/testing"
],
"@alfresco/adf-content-services": [
"../../lib/content-services"
],
"@alfresco/adf-process-services": [
"../../lib/process-services"
],
"@alfresco/adf-insights": [
"../../lib/insights"
]
}
}, },
"exclude": [ "exclude": [
"test.ts", "test.ts",

View File

@@ -88,7 +88,7 @@ describe('Aspect oriented config', () => {
it('[C261117] Should be possible restrict the display properties of one an aspect', () => { it('[C261117] Should be possible restrict the display properties of one an aspect', () => {
configEditorPage.enterConfiguration('{ "presets": {' + configEditorPage.enterBigConfigurationText('{ "presets": {' +
' "default": [{' + ' "default": [{' +
' "title": "IMAGE",' + ' "title": "IMAGE",' +
' "items": [' + ' "items": [' +
@@ -123,7 +123,7 @@ describe('Aspect oriented config', () => {
it('[C260185] Should ignore not existing aspect when present in the configuration', () => { it('[C260185] Should ignore not existing aspect when present in the configuration', () => {
configEditorPage.enterConfiguration(' {' + configEditorPage.enterBigConfigurationText(' {' +
' "presets": {' + ' "presets": {' +
' "default": {' + ' "default": {' +
' "exif:exif": "*",' + ' "exif:exif": "*",' +
@@ -152,7 +152,7 @@ describe('Aspect oriented config', () => {
it('[C260183] Should show all the aspect if the content-metadata configuration is NOT provided', () => { it('[C260183] Should show all the aspect if the content-metadata configuration is NOT provided', () => {
configEditorPage.enterConfiguration('{ }'); configEditorPage.enterBigConfigurationText('{ }');
configEditorPage.clickSaveButton(); configEditorPage.clickSaveButton();
@@ -176,7 +176,7 @@ describe('Aspect oriented config', () => {
it('[C260182] Should show all the aspects if the default configuration contains the star symbol', () => { it('[C260182] Should show all the aspects if the default configuration contains the star symbol', () => {
configEditorPage.enterConfiguration('{' + configEditorPage.enterBigConfigurationText('{' +
' "presets": {' + ' "presets": {' +
' "default": "*"' + ' "default": "*"' +
' }' + ' }' +
@@ -205,7 +205,7 @@ describe('Aspect oriented config', () => {
it('[C268899] Should be possible use a Translation key as Title of a metadata group', () => { it('[C268899] Should be possible use a Translation key as Title of a metadata group', () => {
configEditorPage.enterConfiguration('{' + configEditorPage.enterBigConfigurationText('{' +
' "presets": {' + ' "presets": {' +
' "default": [' + ' "default": [' +
' {' + ' {' +
@@ -221,11 +221,8 @@ describe('Aspect oriented config', () => {
' "title": "GROUP-TITLE2-TRANSLATION-KEY",' + ' "title": "GROUP-TITLE2-TRANSLATION-KEY",' +
' "items": [' + ' "items": [' +
' {' + ' {' +
' "aspect": "kitten:food",' + ' "aspect": "exif:exif"' +
' "properties": [' + ' "properties": "*"' +
' "kitten:favourite-food",' +
' "kitten:recommended-food"' +
' ]' +
' }' + ' }' +
' ]' + ' ]' +
' }' + ' }' +
@@ -255,7 +252,7 @@ describe('Aspect oriented config', () => {
it('[C279968] Should be possible use a custom preset', () => { it('[C279968] Should be possible use a custom preset', () => {
configEditorPage.enterConfiguration('{' + configEditorPage.enterBigConfigurationText('{' +
' "presets": {' + ' "presets": {' +
' "custom-preset": {' + ' "custom-preset": {' +
' "exif:exif": "*",' + ' "exif:exif": "*",' +

View File

@@ -27,6 +27,7 @@ import { of } from 'rxjs';
import { ContentTestingModule } from '../testing/content.testing.module'; import { ContentTestingModule } from '../testing/content.testing.module';
import { DocumentListService } from '../document-list/services/document-list.service'; import { DocumentListService } from '../document-list/services/document-list.service';
import { DocumentListComponent } from '../document-list/components/document-list.component'; import { DocumentListComponent } from '../document-list/components/document-list.component';
import { ShareDataRow } from '../document-list';
describe('ContentNodeSelectorDialogComponent', () => { describe('ContentNodeSelectorDialogComponent', () => {
@@ -36,7 +37,10 @@ describe('ContentNodeSelectorDialogComponent', () => {
title: 'Move along citizen...', title: 'Move along citizen...',
actionName: 'move', actionName: 'move',
select: new EventEmitter<Node>(), select: new EventEmitter<Node>(),
rowFilter: () => { rowFilter: (shareDataRow: ShareDataRow) => {
if (shareDataRow.node.entry.name === 'impossible-name') {
return true;
}
}, },
imageResolver: () => 'piccolo', imageResolver: () => 'piccolo',
currentFolderId: 'cat-girl-nuku-nuku' currentFolderId: 'cat-girl-nuku-nuku'
@@ -88,14 +92,25 @@ describe('ContentNodeSelectorDialogComponent', () => {
expect(documentList.componentInstance.currentFolderId).toBe('cat-girl-nuku-nuku'); expect(documentList.componentInstance.currentFolderId).toBe('cat-girl-nuku-nuku');
}); });
xit('should pass through the injected rowFilter to the documentList', (done) => { it('should pass through the injected rowFilter to the documentList', () => {
fixture.whenStable().then(() => { let documentList = fixture.debugElement.query(By.directive(DocumentListComponent));
let documentList = fixture.debugElement.query(By.directive(DocumentListComponent)); expect(documentList).not.toBeNull('Document list should be shown');
expect(documentList).not.toBeNull('Document list should be shown'); expect(documentList.componentInstance.rowFilter({
expect(documentList.componentInstance.rowFilter).toBe(data.rowFilter); node: {
done(); entry: new Node({
}); name: 'impossible-name',
id: 'name'
})
}
}))
.toBe(data.rowFilter(<ShareDataRow> {
node: {
entry: new Node({
name: 'impossible-name',
id: 'name'
})
}
}));
}); });
it('should pass through the injected imageResolver to the documentList', () => { it('should pass through the injected imageResolver to the documentList', () => {

View File

@@ -120,31 +120,6 @@ describe('ShareDialogComponent', () => {
}); });
})); }));
xit(`should copy shared link and notify on button event`, (done) => {
node.entry.properties['qshare:sharedId'] = 'sharedId';
spyOn(document, 'execCommand').and.callThrough();
component.data = {
node,
baseShareUrl: 'some-url/'
};
fixture.detectChanges();
fixture.whenStable().then(() => {
fixture.detectChanges();
fixture.nativeElement.querySelector('.adf-input-action')
.dispatchEvent(new MouseEvent('click'));
fixture.detectChanges();
expect(document.execCommand).toHaveBeenCalledWith('copy');
expect(notificationServiceMock.openSnackMessage).toHaveBeenCalledWith('SHARE.CLIPBOARD-MESSAGE');
done();
});
});
it('should open a confirmation dialog when unshare button is triggered', () => { it('should open a confirmation dialog when unshare button is triggered', () => {
spyOn(matDialog, 'open').and.returnValue({ beforeClose: () => of(false) }); spyOn(matDialog, 'open').and.returnValue({ beforeClose: () => of(false) });
spyOn(sharedLinksApiService, 'deleteSharedLink').and.callThrough(); spyOn(sharedLinksApiService, 'deleteSharedLink').and.callThrough();

View File

@@ -1219,7 +1219,7 @@ describe('DocumentList', () => {
documentList.loadFolderByNodeId('-recent-'); documentList.loadFolderByNodeId('-recent-');
}); });
xit('should emit error when fetch recent fails on search call', (done) => { it('should emit error when fetch recent fails on search call', (done) => {
spyOn(customResourcesService, 'loadFolderByNodeId').and.returnValue(throwError('error')); spyOn(customResourcesService, 'loadFolderByNodeId').and.returnValue(throwError('error'));
let disposableError = documentList.error.subscribe((val) => { let disposableError = documentList.error.subscribe((val) => {

View File

@@ -55,7 +55,6 @@ class TestComponent {
describe('FolderCreateDirective', () => { describe('FolderCreateDirective', () => {
let fixture: ComponentFixture<TestTypeComponent | TestComponent>; let fixture: ComponentFixture<TestTypeComponent | TestComponent>;
let element; let element;
let node: any;
let dialog: MatDialog; let dialog: MatDialog;
let contentService: ContentService; let contentService: ContentService;
let dialogRefMock; let dialogRefMock;
@@ -85,8 +84,6 @@ describe('FolderCreateDirective', () => {
}); });
beforeEach(() => { beforeEach(() => {
node = { entry: { id: 'nodeId' } };
dialogRefMock = { dialogRefMock = {
afterClosed: (val) => of(val), afterClosed: (val) => of(val),
componentInstance: { componentInstance: {
@@ -106,22 +103,6 @@ describe('FolderCreateDirective', () => {
spyOn(dialog, 'open').and.returnValue(dialogRefMock); spyOn(dialog, 'open').and.returnValue(dialogRefMock);
}); });
xit('should emit folderCreate event when input value is not undefined', (done) => {
spyOn(dialogRefMock, 'afterClosed').and.returnValue(of(node));
spyOn(contentService.folderCreate, 'next');
contentService.folderCreate.subscribe((val) => {
expect(val).toBe(node);
done();
});
fixture.detectChanges();
fixture.whenStable().then(() => {
element.nativeElement.click();
});
});
it('should not emit folderCreate event when input value is undefined', () => { it('should not emit folderCreate event when input value is undefined', () => {
spyOn(dialogRefMock, 'afterClosed').and.returnValue(of(null)); spyOn(dialogRefMock, 'afterClosed').and.returnValue(of(null));
spyOn(contentService.folderCreate, 'next'); spyOn(contentService.folderCreate, 'next');

View File

@@ -9,7 +9,7 @@
"entryFile": "./public-api.ts", "entryFile": "./public-api.ts",
"flatModuleFile": "adf-content-services", "flatModuleFile": "adf-content-services",
"umdModuleIds": { "umdModuleIds": {
"@alfresco/js-api": "@alfresco/js-ap", "@alfresco/js-api": "@alfresco/js-api",
"minimatch": "minimatch", "minimatch": "minimatch",
"@angular/platform-browser/animations": "@angular/platform-browser/animations", "@angular/platform-browser/animations": "@angular/platform-browser/animations",
"@angular/material": "@angular/material", "@angular/material": "@angular/material",

View File

@@ -20,7 +20,7 @@ import { TreeViewService } from './tree-view.service';
import { TestBed } from '@angular/core/testing'; import { TestBed } from '@angular/core/testing';
import { ContentTestingModule } from '../../testing/content.testing.module'; import { ContentTestingModule } from '../../testing/content.testing.module';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { TreeBaseNode } from 'tree-view/models/tree-view.model'; import { TreeBaseNode } from '../models/tree-view.model';
describe('TreeViewService', () => { describe('TreeViewService', () => {

View File

@@ -1,41 +0,0 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"skipLibCheck": false,
"noLib": false,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitAny": false,
"noImplicitReturns": false,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"removeComments": true,
"declaration": true,
"outDir": "../dist/content-services/",
"baseUrl" : "./",
"paths": {
"@alfresco/adf-process-services": ["../process-services"],
"@alfresco/adf-core": ["../core"]
},
"lib": [
"es2016",
"dom"
],
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true
},
"exclude": [
"demo",
"node_modules",
"dist"
],
"angularCompilerOptions": {
"strictMetadataEmit": false,
"skipTemplateCodegen": true
}
}

View File

@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../dist/content-services/"
}
}

View File

@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.spec.json",
"files": [
"test.ts"
]
}

View File

@@ -1106,7 +1106,6 @@
}, },
"categories": { "categories": {
"type": "array", "type": "array",
"minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"required": [ "required": [

View File

@@ -52,10 +52,12 @@ import { startupServiceFactory } from './services/startup-service-factory';
import { SortingPickerModule } from './sorting-picker/sorting-picker.module'; import { SortingPickerModule } from './sorting-picker/sorting-picker.module';
import { IconModule } from './icon/icon.module'; import { IconModule } from './icon/icon.module';
import { TranslateLoaderService } from './services/translate-loader.service'; import { TranslateLoaderService } from './services/translate-loader.service';
import { ExtensionsModule } from '@alfresco/adf-extensions';
@NgModule({ @NgModule({
imports: [ imports: [
TranslateModule, TranslateModule,
ExtensionsModule.forChild(),
AboutModule, AboutModule,
ViewerModule, ViewerModule,
SidenavLayoutModule, SidenavLayoutModule,

View File

@@ -627,14 +627,14 @@ describe('FormComponent', () => {
it('should parse form from json', () => { it('should parse form from json', () => {
let form = formComponent.parseForm({ let form = formComponent.parseForm({
id: '<id>', id: 1,
fields: [ fields: [
{ id: 'field1', type: FormFieldTypes.CONTAINER } { id: 'field1', type: FormFieldTypes.CONTAINER }
] ]
}); });
expect(form).toBeDefined(); expect(form).toBeDefined();
expect(form.id).toBe('<id>'); expect(form.id).toBe(1);
expect(form.fields.length).toBe(1); expect(form.fields.length).toBe(1);
expect(form.fields[0].id).toBe('field1'); expect(form.fields[0].id).toBe('field1');
}); });
@@ -642,7 +642,7 @@ describe('FormComponent', () => {
it('should provide outcomes for form definition', () => { it('should provide outcomes for form definition', () => {
spyOn(formComponent, 'getFormDefinitionOutcomes').and.callThrough(); spyOn(formComponent, 'getFormDefinitionOutcomes').and.callThrough();
let form = formComponent.parseForm({ id: '<id>' }); let form = formComponent.parseForm({ id: 1 });
expect(formComponent.getFormDefinitionOutcomes).toHaveBeenCalledWith(form); expect(formComponent.getFormDefinitionOutcomes).toHaveBeenCalledWith(form);
}); });

View File

@@ -9,7 +9,7 @@
"entryFile": "./public-api.ts", "entryFile": "./public-api.ts",
"flatModuleFile": "adf-core", "flatModuleFile": "adf-core",
"umdModuleIds": { "umdModuleIds": {
"@alfresco/js-api": "@alfresco/js-ap", "@alfresco/js-api": "@alfresco/js-api",
"minimatch": "minimatch-browser", "minimatch": "minimatch-browser",
"@angular/platform-browser/animations": "@angular/platform-browser/animations", "@angular/platform-browser/animations": "@angular/platform-browser/animations",
"@angular/material": "@angular/material", "@angular/material": "@angular/material",
@@ -23,7 +23,8 @@
"moment": "moment", "moment": "moment",
"moment-es6": "moment-es6", "moment-es6": "moment-es6",
"moment/src/moment": "moment/src/moment", "moment/src/moment": "moment/src/moment",
"@ngx-translate/core": "@ngx-translate/core" "@ngx-translate/core": "@ngx-translate/core",
"rxjs": "rxjs"
} }
} }
} }

View File

@@ -1,46 +0,0 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"skipLibCheck": false,
"noLib": false,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitAny": false,
"noImplicitReturns": false,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"removeComments": true,
"declaration": true,
"outDir": "../dist/core/",
"baseUrl": "./",
"allowSyntheticDefaultImports": true,
"paths": {
"@alfresco/adf-process-services": [
"../process-services"
],
"@alfresco/adf-content-services": [
"../content-services"
]
},
"lib": [
"es2016",
"dom"
],
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true
},
"exclude": [
"demo",
"node_modules",
"dist"
],
"angularCompilerOptions": {
"strictMetadataEmit": false,
"skipTemplateCodegen": true
}
}

View File

@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../dist/core/"
}
}

View File

@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.spec.json",
"files": [
"test.ts"
]
}

View File

@@ -76,7 +76,7 @@
mat-icon-button mat-icon-button
title="{{ 'ADF_VIEWER.ACTIONS.DOWNLOAD' | translate }}" title="{{ 'ADF_VIEWER.ACTIONS.DOWNLOAD' | translate }}"
data-automation-id="adf-toolbar-download" data-automation-id="adf-toolbar-download"
[adfNodeDownload]="node"> [adfNodeDownload]="nodeEntry">
<mat-icon>file_download</mat-icon> <mat-icon>file_download</mat-icon>
</button> </button>
@@ -169,6 +169,7 @@
<div *ngIf="!isLoading" class="adf-viewer-main" fxFlexOrder="1" fxFlex="1 1 auto"> <div *ngIf="!isLoading" class="adf-viewer-main" fxFlexOrder="1" fxFlex="1 1 auto">
<div class="adf-viewer-layout-content adf-viewer__fullscreen-container"> <div class="adf-viewer-layout-content adf-viewer__fullscreen-container">
<div class="adf-viewer-content-container" [ngSwitch]="viewerType"> <div class="adf-viewer-content-container" [ngSwitch]="viewerType">
<ng-container *ngSwitchCase="'pdf'"> <ng-container *ngSwitchCase="'pdf'">
<adf-pdf-viewer [thumbnailsTemplate]="thumbnailsTemplate" [allowThumbnails]="allowThumbnails" [blobFile]="blobFile" [urlFile]="urlFileContent" [nameFile]="displayName"></adf-pdf-viewer> <adf-pdf-viewer [thumbnailsTemplate]="thumbnailsTemplate" [allowThumbnails]="allowThumbnails" [blobFile]="blobFile" [urlFile]="urlFileContent" [nameFile]="displayName"></adf-pdf-viewer>
</ng-container> </ng-container>
@@ -195,8 +196,22 @@
</ng-container> </ng-container>
<ng-container *ngSwitchCase="'custom'"> <ng-container *ngSwitchCase="'custom'">
<ng-container *ngFor="let ext of viewerExtensions">
<adf-preview-extension
*ngIf="extension === ext.fileExtension"
[id]="ext.component"
[node]="nodeEntry.entry"
[url]="urlFileContent"
[extension]="extension"
[attr.data-automation-id]="ext.component">
</adf-preview-extension>
</ng-container>
<span class="adf-viewer-custom-content" *ngFor="let extensionTemplate of extensionTemplates"> <span class="adf-viewer-custom-content" *ngFor="let extensionTemplate of extensionTemplates">
<ng-template *ngIf="extensionTemplate.isVisible" [ngTemplateOutlet]="extensionTemplate.template" [ngTemplateOutletContext]="{ urlFileContent: urlFileContent, extension:extension }"> <ng-template *ngIf="extensionTemplate.isVisible"
[ngTemplateOutlet]="extensionTemplate.template"
[ngTemplateOutletContext]="{ urlFileContent: urlFileContent, extension:extension }">
</ng-template> </ng-template>
</span> </span>
</ng-container> </ng-container>

View File

@@ -600,10 +600,10 @@ describe('ViewerComponent', () => {
}); });
it('should get and assign node for download', (done) => { it('should get and assign node for download', (done) => {
const node = { id: 'fake-node' };
component.nodeId = '12'; component.nodeId = '12';
component.urlFile = ''; component.urlFile = '';
const displayName = 'the-name'; const displayName = 'the-name';
const node = new NodeEntry({ entry: { name: displayName, id: '12', content: { mimeType: 'txt' } } });
const nodeDetails = { name: displayName, id: '12', content: { mimeType: 'txt' } }; const nodeDetails = { name: displayName, id: '12', content: { mimeType: 'txt' } };
const contentUrl = '/content/url/path'; const contentUrl = '/content/url/path';
const alfrescoApiInstanceMock = { const alfrescoApiInstanceMock = {
@@ -618,7 +618,7 @@ describe('ViewerComponent', () => {
component.ngOnChanges(null); component.ngOnChanges(null);
fixture.whenStable().then(() => { fixture.whenStable().then(() => {
fixture.detectChanges(); fixture.detectChanges();
expect(component.node).toBe(node); expect(component.nodeEntry).toBe(node);
done(); done();
}); });
}); });

View File

@@ -31,6 +31,7 @@ import { ViewerSidebarComponent } from './viewer-sidebar.component';
import { ViewerToolbarComponent } from './viewer-toolbar.component'; import { ViewerToolbarComponent } from './viewer-toolbar.component';
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
import { ViewUtilService } from '../services/view-util.service'; import { ViewUtilService } from '../services/view-util.service';
import { ExtensionService, ViewerExtensionRef } from '@alfresco/adf-extensions';
@Component({ @Component({
selector: 'adf-viewer', selector: 'adf-viewer',
@@ -201,7 +202,7 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
viewerType = 'unknown'; viewerType = 'unknown';
isLoading = false; isLoading = false;
node: NodeEntry; nodeEntry: NodeEntry;
extensionTemplates: { template: TemplateRef<any>, isVisible: boolean }[] = []; extensionTemplates: { template: TemplateRef<any>, isVisible: boolean }[] = [];
externalExtensions: string[] = []; externalExtensions: string[] = [];
@@ -211,6 +212,7 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
sidebarRightTemplateContext: { node: Node } = { node: null }; sidebarRightTemplateContext: { node: Node } = { node: null };
sidebarLeftTemplateContext: { node: Node } = { node: null }; sidebarLeftTemplateContext: { node: Node } = { node: null };
fileTitle: string; fileTitle: string;
viewerExtensions: Array<ViewerExtensionRef> = [];
private cacheBusterNumber; private cacheBusterNumber;
@@ -220,7 +222,7 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
private extensions = { private extensions = {
image: ['png', 'jpg', 'jpeg', 'gif', 'bpm', 'svg'], image: ['png', 'jpg', 'jpeg', 'gif', 'bpm', 'svg'],
media: ['wav', 'mp4', 'mp3', 'webm', 'ogg'], media: ['wav', 'mp4', 'mp3', 'webm', 'ogg'],
text: ['txt', 'xml', 'js', 'html', 'json', 'ts', 'css', 'md'], text: ['txt', 'xml', 'html', 'json', 'ts', 'css', 'md'],
pdf: ['pdf'] pdf: ['pdf']
}; };
@@ -236,6 +238,7 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
private viewUtils: ViewUtilService, private viewUtils: ViewUtilService,
private logService: LogService, private logService: LogService,
private location: Location, private location: Location,
private extensionService: ExtensionService,
private el: ElementRef) { private el: ElementRef) {
} }
@@ -247,6 +250,15 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
this.subscriptions.push( this.subscriptions.push(
this.apiService.nodeUpdated.subscribe((node) => this.onNodeUpdated(node)) this.apiService.nodeUpdated.subscribe((node) => this.onNodeUpdated(node))
); );
this.extensionLoad();
}
private extensionLoad() {
this.viewerExtensions = this.extensionService.getFeature('viewer.content');
this.viewerExtensions.forEach((currentViewerExtension: ViewerExtensionRef) => {
this.externalExtensions.push(currentViewerExtension.fileExtension);
});
} }
ngOnDestroy() { ngOnDestroy() {
@@ -280,7 +292,7 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
} else if (this.nodeId) { } else if (this.nodeId) {
this.apiService.nodesApi.getNode(this.nodeId, { include: ['allowableOperations'] }).then( this.apiService.nodesApi.getNode(this.nodeId, { include: ['allowableOperations'] }).then(
(node: NodeEntry) => { (node: NodeEntry) => {
this.node = node; this.nodeEntry = node;
this.setUpNodeFile(node.entry).then(() => { this.setUpNodeFile(node.entry).then(() => {
this.isLoading = false; this.isLoading = false;
}); });

View File

@@ -21,6 +21,8 @@ import { TranslateModule } from '@ngx-translate/core';
import { FlexLayoutModule } from '@angular/flex-layout'; import { FlexLayoutModule } from '@angular/flex-layout';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { ExtensionsModule } from '@alfresco/adf-extensions';
import { MaterialModule } from '../material.module'; import { MaterialModule } from '../material.module';
import { ToolbarModule } from '../toolbar/toolbar.module'; import { ToolbarModule } from '../toolbar/toolbar.module';
import { PipeModule } from '../pipes/pipe.module'; import { PipeModule } from '../pipes/pipe.module';
@@ -43,6 +45,7 @@ import { DirectiveModule } from '../directives/directive.module';
@NgModule({ @NgModule({
imports: [ imports: [
ExtensionsModule,
CommonModule, CommonModule,
MaterialModule, MaterialModule,
TranslateModule.forChild(), TranslateModule.forChild(),

View File

@@ -7,7 +7,23 @@
"entryFile": "src/public-api.ts", "entryFile": "src/public-api.ts",
"flatModuleFile": "adf-extensions", "flatModuleFile": "adf-extensions",
"umdModuleIds": { "umdModuleIds": {
"@alfresco/js-api": "@alfresco/js-ap" "@alfresco/js-api": "@alfresco/js-api",
"minimatch": "minimatch",
"@angular/platform-browser/animations": "@angular/platform-browser/animations",
"@angular/material": "@angular/material",
"@mat-datetimepicker": "@mat-datetimepicker",
"@angular/flex-layout": "@angular/flex-layout",
"@alfresco/adf-core": "@alfresco/adf-core",
"@alfresco/adf-content-services": "@alfresco/adf-content-services",
"@angular/material-moment-adapter": "@angular/material-moment-adapter",
"@angular/animations": "@angular/animations",
"@angular/cdk/platform": "@angular/cdk/platform",
"@angular/material/core": "@angular/material/core",
"moment": "moment",
"moment-es6": "moment-es6",
"moment/src/moment": "moment/src/moment",
"@ngx-translate/core": "@ngx-translate/core",
"rxjs": "rxjs"
} }
} }
} }

View File

@@ -2,7 +2,6 @@
"name": "@alfresco/adf-extensions", "name": "@alfresco/adf-extensions",
"description": "Provides extensibility support for ADF applications.", "description": "Provides extensibility support for ADF applications.",
"version": "3.0.0", "version": "3.0.0",
"license": "Apache-2.0",
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"main": "bundles/adf-extensions.js", "main": "bundles/adf-extensions.js",
"repository": { "repository": {
@@ -13,9 +12,17 @@
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues" "url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
}, },
"peerDependencies": { "peerDependencies": {
"@angular/common": "^6.0.0", "@angular/common": ">=7.0.3",
"@angular/core": "^6.0.0", "@angular/core": ">=7.0.3",
"@angular/http": "^6.1.4", "@angular/http": ">=7.0.3",
"@alfresco/js-api": "3.0.0" "@alfresco/js-api": "3.0.0"
} },
"keywords": [
"extensions",
"alfresco-component",
"angular",
"activiti",
"components"
],
"license": "Apache-2.0"
} }

View File

@@ -0,0 +1,21 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from './viewer/preview-extension.component';
export * from './dynamic-column/dynamic-column.component';
export * from './dynamic-component/dynamic.component';
export * from './dynamic-tab/dynamic-tab.component';

View File

@@ -0,0 +1,99 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
Component,
Input,
ComponentRef,
OnInit,
ComponentFactoryResolver,
ViewChild,
ViewContainerRef,
OnDestroy,
OnChanges
} from '@angular/core';
import { ExtensionService } from '../../services/extension.service';
import { Node } from '@alfresco/js-api';
@Component({
selector: 'adf-preview-extension',
template: `
<div #content></div>
`
})
export class PreviewExtensionComponent implements OnInit, OnChanges, OnDestroy {
@ViewChild('content', { read: ViewContainerRef })
content: ViewContainerRef;
@Input()
id: string;
@Input()
url: string;
@Input()
extension: string;
@Input()
node: Node;
private componentRef: ComponentRef<any>;
constructor(
private extensionService: ExtensionService,
private componentFactoryResolver: ComponentFactoryResolver
) {}
ngOnInit() {
if (!this.id) {
return;
}
const componentType = this.extensionService.getComponentById(this.id);
if (componentType) {
const factory = this.componentFactoryResolver.resolveComponentFactory(
componentType
);
if (factory) {
this.content.clear();
this.componentRef = this.content.createComponent(factory, 0);
this.updateInstance();
}
}
}
ngOnChanges() {
this.updateInstance();
}
ngOnDestroy() {
if (this.componentRef) {
this.componentRef.destroy();
this.componentRef = null;
}
}
private updateInstance() {
if (this.componentRef && this.componentRef.instance) {
const instance = this.componentRef.instance;
instance.node = this.node;
instance.url = this.url;
instance.extension = this.extension;
}
}
}

View File

@@ -146,5 +146,5 @@ export function mergeArrays(left: any[], right: any[]): any[] {
} }
}); });
return Object.values(map).concat(result); return Object.keys(map).map((key) => map[key]).concat(result);
} }

View File

@@ -0,0 +1,18 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"id": "https://github.com/Alfresco/alfresco-ng2-components/tree/master/lib/extensions/config/schema/app-extension.schema.json",
"title": "ACA Extension Schema",
"description": "Provides a validation schema for extensions",
"type": "object",
"properties": {
"$references": {
"description": "References to external files",
"type": "array",
"items": {
"type": "string"
},
"minItems": 0,
"uniqueItems": true
}
}
}

View File

@@ -1,9 +1,8 @@
{ {
"$schema": "http://json-schema.org/draft-07/schema#", "$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/Alfresco/alfresco-content-app/blob/development/extension.schema.json", "id": "https://github.com/Alfresco/alfresco-ng2-components/tree/master/lib/extensions/config/schema/extension.schema.json",
"title": "ACA Extension Schema", "title": "ACA Extension Schema",
"description": "Provides a validation schema for ACA extensions", "description": "Provides a validation schema for extensions plugin JSON",
"definitions": { "definitions": {
"ruleRef": { "ruleRef": {
"type": "object", "type": "object",

View File

@@ -15,21 +15,46 @@
* limitations under the License. * limitations under the License.
*/ */
import { NgModule } from '@angular/core';
import { DynamicExtensionComponent } from './components/dynamic-component/dynamic.component'; import { DynamicExtensionComponent } from './components/dynamic-component/dynamic.component';
import { DynamicTabComponent } from './components/dynamic-tab/dynamic-tab.component'; import { DynamicTabComponent } from './components/dynamic-tab/dynamic-tab.component';
import { DynamicColumnComponent } from './components/dynamic-column/dynamic-column.component'; import { DynamicColumnComponent } from './components/dynamic-column/dynamic-column.component';
import { PreviewExtensionComponent } from './components/viewer/preview-extension.component';
import { NgModule, ModuleWithProviders, APP_INITIALIZER } from '@angular/core';
import { AppExtensionService } from './services/app-extension.service';
import { setupExtensions } from './services/startup-extension-factory';
@NgModule({ @NgModule({
declarations: [ declarations: [
DynamicExtensionComponent, DynamicExtensionComponent,
DynamicTabComponent, DynamicTabComponent,
DynamicColumnComponent DynamicColumnComponent,
PreviewExtensionComponent
], ],
exports: [ exports: [
DynamicExtensionComponent, DynamicExtensionComponent,
DynamicTabComponent, DynamicTabComponent,
DynamicColumnComponent DynamicColumnComponent,
PreviewExtensionComponent
] ]
}) })
export class ExtensionsModule {} export class ExtensionsModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: ExtensionsModule,
providers: [
{
provide: APP_INITIALIZER,
useFactory: setupExtensions,
deps: [AppExtensionService],
multi: true
}
]
};
}
static forChild(): ModuleWithProviders {
return {
ngModule: ExtensionsModule
};
}
}

View File

@@ -16,11 +16,8 @@
*/ */
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { import { ExtensionConfig, ExtensionRef } from '../config/extension.config';
ExtensionService, import { ExtensionService } from '../services/extension.service';
ExtensionConfig,
ExtensionRef
} from '@alfresco/adf-extensions';
import { Observable, BehaviorSubject } from 'rxjs'; import { Observable, BehaviorSubject } from 'rxjs';
@Injectable({ @Injectable({
@@ -31,22 +28,19 @@ export class AppExtensionService {
references$: Observable<ExtensionRef[]>; references$: Observable<ExtensionRef[]>;
constructor(private extensions: ExtensionService) { constructor(protected extensionService: ExtensionService) {
this.references$ = this._references.asObservable(); this.references$ = this._references.asObservable();
} }
async load() { async load() {
const config = await this.extensions.load(); const config = await this.extensionService.load();
this.setup(config); this.setup(config);
} }
setup(config: ExtensionConfig) { setup(config: ExtensionConfig) {
if (!config) { if (!config) {
console.error('Extension configuration not found');
return; return;
} }
// tslint:disable-next-line:no-console
console.log('loaded extension config', config);
const references = (config.$references || []) const references = (config.$references || [])
.filter((entry) => typeof entry === 'object') .filter((entry) => typeof entry === 'object')

View File

@@ -34,38 +34,40 @@ export class ExtensionLoaderService {
load(configPath: string, pluginsPath: string): Promise<ExtensionConfig> { load(configPath: string, pluginsPath: string): Promise<ExtensionConfig> {
return new Promise<any>((resolve) => { return new Promise<any>((resolve) => {
this.loadConfig(configPath, 0).then((result) => { this.loadConfig(configPath, 0).then((result) => {
let config = result.config; if (result) {
let config = result.config;
const override = sessionStorage.getItem('app.extension.config'); const override = sessionStorage.getItem('app.extension.config');
if (override) { if (override) {
config = JSON.parse(override); config = JSON.parse(override);
} }
if (config.$references && config.$references.length > 0) { if (config.$references && config.$references.length > 0) {
const plugins = config.$references.map((name, idx) => const plugins = config.$references.map((name, idx) =>
this.loadConfig(`${pluginsPath}/${name}`, idx) this.loadConfig(`${pluginsPath}/${name}`, idx)
); );
Promise.all(plugins).then((results) => { Promise.all(plugins).then((results) => {
const configs = results const configs = results
.filter((entry) => entry) .filter((entry) => entry)
.sort(sortByOrder) .sort(sortByOrder)
.map((entry) => entry.config); .map((entry) => entry.config);
if (configs.length > 0) { if (configs.length > 0) {
config = mergeObjects(config, ...configs); config = mergeObjects(config, ...configs);
} }
config = { config = {
...config, ...config,
...this.getMetadata(result.config), ...this.getMetadata(result.config),
$references: configs.map((ext) => this.getMetadata(ext)) $references: configs.map((ext) => this.getMetadata(ext))
}; };
resolve(config);
});
} else {
resolve(config); resolve(config);
}); }
} else {
resolve(config);
} }
}); });
}); });
@@ -140,6 +142,13 @@ export class ExtensionLoaderService {
return []; return [];
} }
getFeatures(config: ExtensionConfig): any {
if (config) {
return config.features || [];
}
return [];
}
protected setActionDefaults(action: ContentActionRef): ContentActionRef { protected setActionDefaults(action: ContentActionRef): ContentActionRef {
if (action) { if (action) {
action.type = action.type || ContentActionType.default; action.type = action.type || ContentActionType.default;

View File

@@ -34,6 +34,7 @@ export class ExtensionService {
rules: Array<RuleRef> = []; rules: Array<RuleRef> = [];
routes: Array<RouteRef> = []; routes: Array<RouteRef> = [];
actions: Array<ActionRef> = []; actions: Array<ActionRef> = [];
features: Array<any> = [];
authGuards: { [key: string]: Type<{}> } = {}; authGuards: { [key: string]: Type<{}> } = {};
evaluators: { [key: string]: RuleEvaluator } = {}; evaluators: { [key: string]: RuleEvaluator } = {};
@@ -41,7 +42,8 @@ export class ExtensionService {
constructor( constructor(
private loader: ExtensionLoaderService, private loader: ExtensionLoaderService,
private componentRegister: ComponentRegisterService private componentRegister: ComponentRegisterService
) {} ) {
}
/** /**
* Loads and registers an extension config file and plugins (specified by path properties). * Loads and registers an extension config file and plugins (specified by path properties).
@@ -75,6 +77,12 @@ export class ExtensionService {
this.rules = this.loader.getRules(config); this.rules = this.loader.getRules(config);
this.actions = this.loader.getActions(config); this.actions = this.loader.getActions(config);
this.routes = this.loader.getRoutes(config); this.routes = this.loader.getRoutes(config);
this.features = this.loader.getFeatures(config);
}
getFeature(key: string): any[] {
let properties: string[] = Array.isArray(key) ? [key] : key.split('.');
return properties.reduce((prev, curr) => prev && prev[curr], this.features) || [];
} }
/** /**

View File

@@ -0,0 +1,22 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AppExtensionService } from './app-extension.service';
export function setupExtensions(appExtensionService: AppExtensionService): Function {
return () => appExtensionService.load();
}

View File

@@ -15,6 +15,8 @@
* limitations under the License. * limitations under the License.
*/ */
export * from './lib/extensions.module';
export * from './lib/config/action.extensions'; export * from './lib/config/action.extensions';
export * from './lib/config/extension-element'; export * from './lib/config/extension-element';
export * from './lib/config/extension-utils'; export * from './lib/config/extension-utils';
@@ -29,10 +31,11 @@ export * from './lib/config/viewer.extensions';
export * from './lib/services/extension-loader.service'; export * from './lib/services/extension-loader.service';
export * from './lib/services/extension.service'; export * from './lib/services/extension.service';
export * from './lib/services/component-register.service'; export * from './lib/services/component-register.service';
export * from './lib/services/app-extension.service';
export * from './lib/store/states/navigation.state'; export * from './lib/store/states/navigation.state';
export * from './lib/store/states/profile.state'; export * from './lib/store/states/profile.state';
export * from './lib/store/states/selection.state'; export * from './lib/store/states/selection.state';
export * from './lib/store/states/repository.state'; export * from './lib/store/states/repository.state';
export * from './lib/extensions.module'; export * from './lib/components/public-api';

View File

@@ -1,34 +1,7 @@
{ {
"extends": "../../tsconfig.json", "extends": "../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../out-tsc/lib", "outDir": "../dist/extensions/",
"target": "es2015", "baseUrl": "src"
"module": "es2015", }
"moduleResolution": "node",
"declaration": true,
"sourceMap": true,
"inlineSources": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": [
"dom",
"es2015"
]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED",
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
} }

View File

@@ -1,17 +1,6 @@
{ {
"extends": "../../tsconfig.json", "extends": "../tsconfig.spec.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [ "files": [
"src/test.ts" "src/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
] ]
} }

View File

@@ -1,17 +0,0 @@
{
"extends": "../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"adf",
"camelCase"
],
"component-selector": [
true,
"element",
"adf",
"kebab-case"
]
}
}

View File

@@ -9,7 +9,7 @@
"entryFile": "./public-api.ts", "entryFile": "./public-api.ts",
"flatModuleFile": "adf-insights", "flatModuleFile": "adf-insights",
"umdModuleIds": { "umdModuleIds": {
"@alfresco/js-api": "@alfresco/js-ap", "@alfresco/js-api": "@alfresco/js-api",
"minimatch": "minimatch", "minimatch": "minimatch",
"@angular/platform-browser/animations": "@angular/platform-browser/animations", "@angular/platform-browser/animations": "@angular/platform-browser/animations",
"@angular/material": "@angular/material", "@angular/material": "@angular/material",

View File

@@ -1,42 +0,0 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"skipLibCheck": false,
"noLib": false,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitAny": false,
"noImplicitReturns": false,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"removeComments": true,
"declaration": true,
"outDir": "../dist/insights/",
"baseUrl" : "./",
"paths": {
"@alfresco/adf-process-services": ["../process-services"],
"@alfresco/adf-content-services": ["../content-services"],
"@alfresco/adf-core": ["../core"]
},
"lib": [
"es2016",
"dom"
],
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true
},
"exclude": [
"demo",
"node_modules",
"dist"
],
"angularCompilerOptions": {
"strictMetadataEmit": false,
"skipTemplateCodegen": true
}
}

View File

@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../dist/insights/"
}
}

View File

@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.spec.json",
"files": [
"test.ts"
]
}

View File

@@ -6,7 +6,23 @@
"entryFile": "src/public-api.ts", "entryFile": "src/public-api.ts",
"flatModuleFile": "adf-process-services-cloud", "flatModuleFile": "adf-process-services-cloud",
"umdModuleIds": { "umdModuleIds": {
"@alfresco/js-api": "@alfresco/js-ap" "@alfresco/js-api": "@alfresco/js-api",
"minimatch": "minimatch",
"@angular/platform-browser/animations": "@angular/platform-browser/animations",
"@angular/material": "@angular/material",
"@mat-datetimepicker": "@mat-datetimepicker",
"@angular/flex-layout": "@angular/flex-layout",
"@alfresco/adf-core": "@alfresco/adf-core",
"@alfresco/adf-content-services": "@alfresco/adf-content-services",
"@angular/material-moment-adapter": "@angular/material-moment-adapter",
"@angular/animations": "@angular/animations",
"@angular/cdk/platform": "@angular/cdk/platform",
"@angular/material/core": "@angular/material/core",
"moment": "moment",
"moment-es6": "moment-es6",
"moment/src/moment": "moment/src/moment",
"@ngx-translate/core": "@ngx-translate/core",
"rxjs": "rxjs"
} }
} }
} }

View File

@@ -30,7 +30,7 @@ import { TemplateModule, CoreModule } from '@alfresco/adf-core';
TemplateModule, TemplateModule,
MaterialModule, MaterialModule,
FlexLayoutModule, FlexLayoutModule,
CoreModule.forChild() CoreModule
], ],
declarations: [ declarations: [
AppListCloudComponent, AppListCloudComponent,

View File

@@ -35,7 +35,7 @@ import { InitialGroupNamePipe } from './pipe/group-initial.pipe';
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
FormModule, FormModule,
CoreModule.forChild() CoreModule
], ],
declarations: [GroupCloudComponent, InitialGroupNamePipe], declarations: [GroupCloudComponent, InitialGroupNamePipe],
exports: [GroupCloudComponent, InitialGroupNamePipe] exports: [GroupCloudComponent, InitialGroupNamePipe]

View File

@@ -24,7 +24,7 @@ import { GroupCloudModule } from './group/group-cloud.module';
@NgModule({ @NgModule({
imports: [ imports: [
CoreModule.forChild(), CoreModule,
AppListCloudModule, AppListCloudModule,
ProcessCloudModule, ProcessCloudModule,
TaskCloudModule, TaskCloudModule,

View File

@@ -26,7 +26,7 @@ import { CoreModule } from '@alfresco/adf-core';
ProcessFiltersCloudModule, ProcessFiltersCloudModule,
ProcessListCloudModule, ProcessListCloudModule,
StartProcessCloudModule, StartProcessCloudModule,
CoreModule.forChild() CoreModule
], ],
exports: [ exports: [
ProcessFiltersCloudModule, ProcessFiltersCloudModule,

View File

@@ -36,7 +36,7 @@ import { AppListCloudModule } from './../../app/app-list-cloud.module';
FlexLayoutModule, FlexLayoutModule,
MaterialModule, MaterialModule,
AppListCloudModule, AppListCloudModule,
CoreModule.forChild() CoreModule
], ],
declarations: [ProcessFiltersCloudComponent, EditProcessFilterCloudComponent, ProcessFilterDialogCloudComponent], declarations: [ProcessFiltersCloudComponent, EditProcessFilterCloudComponent, ProcessFilterDialogCloudComponent],

View File

@@ -28,7 +28,7 @@ import { ProcessListCloudService } from './services/process-list-cloud.service';
MaterialModule, MaterialModule,
DataTableModule, DataTableModule,
TemplateModule, TemplateModule,
CoreModule.forChild() CoreModule
], ],
declarations: [ProcessListCloudComponent], declarations: [ProcessListCloudComponent],

View File

@@ -30,7 +30,7 @@ import { CoreModule } from '@alfresco/adf-core';
MaterialModule, MaterialModule,
FlexLayoutModule, FlexLayoutModule,
ReactiveFormsModule, ReactiveFormsModule,
CoreModule.forChild() CoreModule
], ],
declarations: [ declarations: [
StartProcessCloudComponent StartProcessCloudComponent

View File

@@ -38,7 +38,7 @@ import { GroupCloudModule } from '../../group/group-cloud.module';
GroupCloudModule, GroupCloudModule,
FormModule, FormModule,
GroupCloudModule, GroupCloudModule,
CoreModule.forChild() CoreModule
], ],
declarations: [StartTaskCloudComponent, PeopleCloudComponent], declarations: [StartTaskCloudComponent, PeopleCloudComponent],
providers: [ providers: [

View File

@@ -37,7 +37,7 @@ import { AppListCloudModule } from './../../app/app-list-cloud.module';
FlexLayoutModule, FlexLayoutModule,
MaterialModule, MaterialModule,
AppListCloudModule, AppListCloudModule,
CoreModule.forChild() CoreModule
], ],
declarations: [TaskFiltersCloudComponent, EditTaskFilterCloudComponent, TaskFilterDialogCloudComponent], declarations: [TaskFiltersCloudComponent, EditTaskFilterCloudComponent, TaskFilterDialogCloudComponent],
exports: [TaskFiltersCloudComponent, EditTaskFilterCloudComponent], exports: [TaskFiltersCloudComponent, EditTaskFilterCloudComponent],

View File

@@ -29,7 +29,7 @@ import { TaskHeaderCloudService } from './services/task-header-cloud.service';
DataTableModule, DataTableModule,
TemplateModule, TemplateModule,
CardViewModule, CardViewModule,
CoreModule.forChild() CoreModule
], ],
declarations: [ declarations: [
TaskHeaderCloudComponent TaskHeaderCloudComponent

View File

@@ -28,7 +28,7 @@ import { TaskListCloudService } from './services/task-list-cloud.service';
MaterialModule, MaterialModule,
DataTableModule, DataTableModule,
TemplateModule, TemplateModule,
CoreModule.forChild() CoreModule
], ],
declarations: [TaskListCloudComponent], declarations: [TaskListCloudComponent],
exports: [TaskListCloudComponent], exports: [TaskListCloudComponent],

View File

@@ -16,6 +16,7 @@
*/ */
export * from './lib/process-services-cloud.module'; export * from './lib/process-services-cloud.module';
export * from './lib/app/public-api'; export * from './lib/app/public-api';
export * from './lib/process/public-api'; export * from './lib/process/public-api';
export * from './lib/task/public-api'; export * from './lib/task/public-api';

View File

@@ -1,32 +1,7 @@
{ {
"extends": "../../tsconfig.json", "extends": "../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../out-tsc/lib", "outDir": "../dist/process-services-cloud/",
"target": "es2015", "baseUrl": "src"
"module": "es2015", }
"moduleResolution": "node",
"declaration": true,
"sourceMap": true,
"inlineSources": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": [
"dom",
"es2015"
]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
} }

View File

@@ -1,17 +1,6 @@
{ {
"extends": "./tsconfig.json", "extends": "../tsconfig.spec.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [ "files": [
"src/test.ts" "src/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
] ]
} }

View File

@@ -1,5 +1,5 @@
{ {
"extends": "../../tslint.json", "extends": "../tslint.json",
"rules": { "rules": {
"directive-selector": [ "directive-selector": [
true, true,

View File

@@ -9,7 +9,7 @@
"entryFile": "./public-api.ts", "entryFile": "./public-api.ts",
"flatModuleFile": "adf-process-services", "flatModuleFile": "adf-process-services",
"umdModuleIds": { "umdModuleIds": {
"@alfresco/js-api": "@alfresco/js-ap", "@alfresco/js-api": "@alfresco/js-api",
"minimatch": "minimatch", "minimatch": "minimatch",
"@angular/platform-browser/animations": "@angular/platform-browser/animations", "@angular/platform-browser/animations": "@angular/platform-browser/animations",
"@angular/material": "@angular/material", "@angular/material": "@angular/material",

View File

@@ -29,7 +29,7 @@ import { fakeProcessInstance, fakeProcessInstancesWithNoName, fakeProcessInstanc
import { ProcessService } from '../services/process.service'; import { ProcessService } from '../services/process.service';
import { ProcessTestingModule } from '../../testing/process.testing.module'; import { ProcessTestingModule } from '../../testing/process.testing.module';
import { fakeProcessCustomSchema } from '../../mock'; import { fakeProcessCustomSchema } from '../../mock';
import { ProcessListModule } from 'process-list/process-list.module'; import { ProcessListModule } from '../process-list.module';
describe('ProcessInstanceListComponent', () => { describe('ProcessInstanceListComponent', () => {

View File

@@ -26,7 +26,7 @@ import { ProcessTestingModule } from '../../testing/process.testing.module';
import { fakeGlobalTask, fakeCustomSchema, fakeEmptyTask } from '../../mock'; import { fakeGlobalTask, fakeCustomSchema, fakeEmptyTask } from '../../mock';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { TaskListModule } from 'task-list/task-list.module'; import { TaskListModule } from '../task-list.module';
declare let jasmine: any; declare let jasmine: any;

View File

@@ -1,42 +0,0 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"skipLibCheck": false,
"noLib": false,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitAny": false,
"noImplicitReturns": false,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"removeComments": true,
"declaration": true,
"outDir": "../dist/process-services/",
"baseUrl" : "./",
"paths": {
"@alfresco/adf-content-services": ["../content-services"],
"@alfresco/adf-insights": ["../analytics"],
"@alfresco/adf-core": ["../core"]
},
"lib": [
"es2016",
"dom"
],
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true
},
"exclude": [
"demo",
"node_modules",
"dist"
],
"angularCompilerOptions": {
"strictMetadataEmit": false,
"skipTemplateCodegen": true
}
}

View File

@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../dist/process-services/"
}
}

View File

@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.spec.json",
"files": [
"test.ts"
]
}

View File

@@ -1,32 +1,6 @@
{ {
"extends": "../../tsconfig.json", "extends": "../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../out-tsc/lib", "outDir": "../dist/testing/"
"target": "es2015", }
"module": "es2015",
"moduleResolution": "node",
"declaration": true,
"sourceMap": true,
"inlineSources": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": [
"dom",
"es2018"
]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
} }

View File

@@ -1,17 +1,6 @@
{ {
"extends": "../../tsconfig.json", "extends": "../tsconfig.spec.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [ "files": [
"src/test.ts" "src/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
] ]
} }

15
lib/tsconfig.spec.json Normal file
View File

@@ -0,0 +1,15 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts",
"**/test.ts"
]
}

315
package-lock.json generated
View File

@@ -1,61 +1,61 @@
{ {
"name": "alfresco-components", "name": "alfresco-components",
"version": "2.7.0-beta5", "version": "3.0.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"@alfresco/adf-content-services": { "@alfresco/adf-content-services": {
"version": "3.0.0-1c25b50b1a15635da1689fdb9f38449a5714630b", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-3.0.0-1c25b50b1a15635da1689fdb9f38449a5714630b.tgz", "resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-3.0.0.tgz",
"integrity": "sha512-TJzQ0fSUkuix7WDkgapQH4jSg60JKPrniNIaE3oPePXN68HA7fSeCPGaZEm3UcGgsvTu8xaVKAgiuLdRnvyOCg==", "integrity": "sha512-fslg/adVczwvrDJV4i/9zWgsrYv+zvqhmiFXubS+vORDvl48fqf3575OIfDSoeRblPrINzyoupH61DHWzAKa/w==",
"requires": { "requires": {
"tslib": "^1.9.0" "tslib": "^1.9.0"
} }
}, },
"@alfresco/adf-core": { "@alfresco/adf-core": {
"version": "3.0.0-1c25b50b1a15635da1689fdb9f38449a5714630b", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-3.0.0-1c25b50b1a15635da1689fdb9f38449a5714630b.tgz", "resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-3.0.0.tgz",
"integrity": "sha512-gbs0L/iLAQzFzznrX9xmDmnuaeURl393Dhjiz4tluKUN7PsmxJJ2HFvg/NnFszWccLo2OpqmhogNrm87tCGqtg==", "integrity": "sha512-3WbOGNPDM1YIG0fSQC2NiEwoNVoBU555yiW6jcNIMI6tSMVw13zuDyA9+wOmo6KY4FZlABah3hGcD/DfqBfNLg==",
"requires": { "requires": {
"tslib": "^1.9.0" "tslib": "^1.9.0"
} }
}, },
"@alfresco/adf-extensions": { "@alfresco/adf-extensions": {
"version": "3.0.0-1c25b50b1a15635da1689fdb9f38449a5714630b", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.0.0-1c25b50b1a15635da1689fdb9f38449a5714630b.tgz", "resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.0.0.tgz",
"integrity": "sha512-N9X8aGrR3V8x60jlLE4vYXm1LO+S2kbSxScElXjC/WJ7W0mu7zBLaNzSeY31oSIoXp+LT8GR/ZZyS8Os1Y6tNw==", "integrity": "sha512-piQvPQbG6Zx6J+M8U4Qv6m42gUOOOy9W3Zwgq+DdVCjP60RfhXcS+HW8wUMUxFOTgjonFOIyNA26BddIOoUhEQ==",
"requires": { "requires": {
"tslib": "^1.9.0" "tslib": "^1.9.0"
} }
}, },
"@alfresco/adf-insights": { "@alfresco/adf-insights": {
"version": "3.0.0-1c25b50b1a15635da1689fdb9f38449a5714630b", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/@alfresco/adf-insights/-/adf-insights-3.0.0-1c25b50b1a15635da1689fdb9f38449a5714630b.tgz", "resolved": "https://registry.npmjs.org/@alfresco/adf-insights/-/adf-insights-3.0.0.tgz",
"integrity": "sha512-7m982iBcLvvPXYmBrmPPjy5Pkr0lVXm97T529EoYMea55h8EmW7C81adbcQiGUy6S9FQzb3iqIoBW2fL8vCPgg==", "integrity": "sha512-rjdESqKT+BFeJXLGqN+LyWUEIujocKOmH+mWaRIY8oeWFnUPrb3vguc3YGoC0eCN6fhNJSGq6v4LUpKcT/M3Eg==",
"requires": { "requires": {
"tslib": "^1.9.0" "tslib": "^1.9.0"
} }
}, },
"@alfresco/adf-process-services": { "@alfresco/adf-process-services": {
"version": "3.0.0-1c25b50b1a15635da1689fdb9f38449a5714630b", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/@alfresco/adf-process-services/-/adf-process-services-3.0.0-1c25b50b1a15635da1689fdb9f38449a5714630b.tgz", "resolved": "https://registry.npmjs.org/@alfresco/adf-process-services/-/adf-process-services-3.0.0.tgz",
"integrity": "sha512-pZyHyZU4Ye8IFVBgWKEu9BG679Vx8Q1yHznhMybKTentvZZQY+atpL+WK6ZyxGlLJyCd3kxKEmUChgDOttV/qQ==", "integrity": "sha512-PqHXne7tERofGAVxzQyNmZKqepOwtNeC4V/ZTcEib3qL44E/LGQJoy+ega3XlrXCqJ3s7eeMtjg6BN7PiarW0A==",
"requires": { "requires": {
"tslib": "^1.9.0" "tslib": "^1.9.0"
} }
}, },
"@alfresco/adf-process-services-cloud": { "@alfresco/adf-process-services-cloud": {
"version": "3.0.0-1c25b50b1a15635da1689fdb9f38449a5714630b", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/@alfresco/adf-process-services-cloud/-/adf-process-services-cloud-3.0.0-1c25b50b1a15635da1689fdb9f38449a5714630b.tgz", "resolved": "https://registry.npmjs.org/@alfresco/adf-process-services-cloud/-/adf-process-services-cloud-3.0.0.tgz",
"integrity": "sha512-bKjDSNV6RaIQtFYoPvzG9QrsrJGhUM/cNAVrcMOiYT4tuFoDWQatUHBx6SRpC/q/8FlQi9qkhwtSjyRxikF7gQ==", "integrity": "sha512-gYPhtzWVpML4IAYdlRKo4DPR+yorRF8KQdyKq5beH9pakjgKsJbaF0KN3cbpuQ+fz8wE2d6bnSBK7QRNB1f4Mw==",
"requires": { "requires": {
"tslib": "^1.9.0" "tslib": "^1.9.0"
} }
}, },
"@alfresco/js-api": { "@alfresco/js-api": {
"version": "3.0.0-d7850f421268e21861e2cd219441b7343efd27ba", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-3.0.0-d7850f421268e21861e2cd219441b7343efd27ba.tgz", "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-3.0.0.tgz",
"integrity": "sha512-glHDIbJX5xoOT1SBlmryJ1aDEH99a/826KnJK5M/ybLfv5yBg+LFL8aMRRMkz26wzKn9YxRwxh14a+6u2u9o1A==", "integrity": "sha512-eiJQRJH+GHw9OszNoHWyGrc/llcI5qQBult5G3TfmRDK3c1YcCLHXbQmaN7hgoOuk0i88oPziXC6ZFS/rfi+fA==",
"requires": { "requires": {
"event-emitter": "0.3.4", "event-emitter": "0.3.4",
"superagent": "3.8.2" "superagent": "3.8.2"
@@ -1922,6 +1922,14 @@
"dev": true, "dev": true,
"optional": true "optional": true
}, },
"adf-monaco-extension": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/adf-monaco-extension/-/adf-monaco-extension-0.0.8.tgz",
"integrity": "sha512-GvbrgvYhLgCLKN9tvgK1JpQW32F2LRSfukNtga9coPNkoDZeYcXEAOSy8ZPtyI7fXROAy8sYI0G4gD94g4SXPw==",
"requires": {
"tslib": "^1.9.0"
}
},
"adf-tslint-rules": { "adf-tslint-rules": {
"version": "0.0.6", "version": "0.0.6",
"resolved": "https://registry.npmjs.org/adf-tslint-rules/-/adf-tslint-rules-0.0.6.tgz", "resolved": "https://registry.npmjs.org/adf-tslint-rules/-/adf-tslint-rules-0.0.6.tgz",
@@ -5906,6 +5914,12 @@
"integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==", "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==",
"dev": true "dev": true
}, },
"electron-to-chromium": {
"version": "1.3.113",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.113.tgz",
"integrity": "sha512-De+lPAxEcpxvqPTyZAXELNpRZXABRxf+uL/rSykstQhzj/B0l1150G/ExIIxKc16lI89Hgz81J0BHAcbTqK49g==",
"dev": true
},
"elliptic": { "elliptic": {
"version": "6.4.1", "version": "6.4.1",
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz",
@@ -8244,7 +8258,7 @@
}, },
"got": { "got": {
"version": "6.7.1", "version": "6.7.1",
"resolved": "http://registry.npmjs.org/got/-/got-6.7.1.tgz", "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz",
"integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -10631,7 +10645,7 @@
"dependencies": { "dependencies": {
"promise": { "promise": {
"version": "7.0.4", "version": "7.0.4",
"resolved": "http://registry.npmjs.org/promise/-/promise-7.0.4.tgz", "resolved": "https://registry.npmjs.org/promise/-/promise-7.0.4.tgz",
"integrity": "sha1-Nj6EpMNsg1a4kP7WLJHOhdAu1Tk=", "integrity": "sha1-Nj6EpMNsg1a4kP7WLJHOhdAu1Tk=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -12457,9 +12471,9 @@
"integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw="
}, },
"ng-packagr": { "ng-packagr": {
"version": "4.4.5", "version": "4.7.1",
"resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-4.4.5.tgz", "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-4.7.1.tgz",
"integrity": "sha512-O2s2j6c54HguKLX183zQtey/hcVY7+XVJ5ynpB/LEaiGmkhxFXAku7K/7lLdCO5GkE8YaYw55M/Cmt8O+AqPsQ==", "integrity": "sha512-MIPKxyrnV22fS3wSfst2XjwWOonFKujVVEnIehYJhiu8GOg37bCdbbr9plsE1jRDmDAUz6M1MvdKibUrJyRp6Q==",
"dev": true, "dev": true,
"requires": { "requires": {
"@ngtools/json-schema": "^1.1.0", "@ngtools/json-schema": "^1.1.0",
@@ -12476,7 +12490,7 @@
"less-plugin-npm-import": "^2.1.0", "less-plugin-npm-import": "^2.1.0",
"node-sass": "^4.9.3", "node-sass": "^4.9.3",
"node-sass-tilde-importer": "^1.0.0", "node-sass-tilde-importer": "^1.0.0",
"opencollective": "^1.0.3", "opencollective-postinstall": "^2.0.1",
"postcss": "^7.0.0", "postcss": "^7.0.0",
"postcss-url": "^8.0.0", "postcss-url": "^8.0.0",
"read-pkg-up": "^4.0.0", "read-pkg-up": "^4.0.0",
@@ -12484,7 +12498,7 @@
"rollup": "^0.67.0", "rollup": "^0.67.0",
"rollup-plugin-commonjs": "^9.1.3", "rollup-plugin-commonjs": "^9.1.3",
"rollup-plugin-json": "^3.1.0", "rollup-plugin-json": "^3.1.0",
"rollup-plugin-node-resolve": "^3.0.0", "rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-sourcemaps": "^0.4.2",
"rxjs": "^6.0.0", "rxjs": "^6.0.0",
"stylus": "^0.54.5", "stylus": "^0.54.5",
@@ -12505,23 +12519,36 @@
"dev": true "dev": true
}, },
"autoprefixer": { "autoprefixer": {
"version": "9.4.2", "version": "9.4.8",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.4.2.tgz", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.4.8.tgz",
"integrity": "sha512-tYQYJvZvqlJCzF+BLC//uAcdT/Yy4ik9bwZRXr/EehUJ/bjjpTthsWTy8dpowdoIE1sLCDf1ch4Eb2cOSzZC9w==", "integrity": "sha512-DIhd0KMi9Nql3oJkJ2HCeOVihrXFPtWXc6ckwaUNwliDOt9OGr0fk8vV8jCLWXnZc1EXvQ2uLUzGpcPxFAQHEQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"browserslist": "^4.3.5", "browserslist": "^4.4.1",
"caniuse-lite": "^1.0.30000914", "caniuse-lite": "^1.0.30000938",
"normalize-range": "^0.1.2", "normalize-range": "^0.1.2",
"num2fraction": "^1.2.2", "num2fraction": "^1.2.2",
"postcss": "^7.0.6", "postcss": "^7.0.14",
"postcss-value-parser": "^3.3.1" "postcss-value-parser": "^3.3.1"
},
"dependencies": {
"browserslist": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.4.1.tgz",
"integrity": "sha512-pEBxEXg7JwaakBXjATYw/D1YZh4QUSCX/Mnd/wnqSRPPSi1U39iDhDoKGoBUcraKdxDlrYqJxSI5nNvD+dWP2A==",
"dev": true,
"requires": {
"caniuse-lite": "^1.0.30000929",
"electron-to-chromium": "^1.3.103",
"node-releases": "^1.1.3"
}
}
} }
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30000918", "version": "1.0.30000938",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000918.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000938.tgz",
"integrity": "sha512-CAZ9QXGViBvhHnmIHhsTPSWFBujDaelKnUj7wwImbyQRxmXynYqKGi3UaZTSz9MoVh+1EVxOS/DFIkrJYgR3aw==", "integrity": "sha512-ekW8NQ3/FvokviDxhdKLZZAx7PptXNwxKgXtnR5y+PR3hckwuP3yJ1Ir+4/c97dsHNqtAyfKUGdw8P4EYzBNgw==",
"dev": true "dev": true
}, },
"cross-spawn": { "cross-spawn": {
@@ -12605,7 +12632,7 @@
"dependencies": { "dependencies": {
"chalk": { "chalk": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -12619,9 +12646,9 @@
} }
}, },
"p-limit": { "p-limit": {
"version": "2.0.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz",
"integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==",
"dev": true, "dev": true,
"requires": { "requires": {
"p-try": "^2.0.0" "p-try": "^2.0.0"
@@ -12675,7 +12702,7 @@
}, },
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -12824,6 +12851,15 @@
} }
} }
}, },
"node-releases": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.8.tgz",
"integrity": "sha512-gQm+K9mGCiT/NXHy+V/ZZS1N/LOaGGqRAAJJs3X9Ah1g+CIbRcBgNyoNYQ+SEtcyAtB9KqDruu+fF7nWjsqRaA==",
"dev": true,
"requires": {
"semver": "^5.3.0"
}
},
"node-sass": { "node-sass": {
"version": "4.9.2", "version": "4.9.2",
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.2.tgz", "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.2.tgz",
@@ -13508,6 +13544,12 @@
} }
} }
}, },
"opencollective-postinstall": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz",
"integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==",
"dev": true
},
"opener": { "opener": {
"version": "1.5.1", "version": "1.5.1",
"resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz",
@@ -14194,21 +14236,52 @@
"dev": true "dev": true
}, },
"postcss": { "postcss": {
"version": "7.0.6", "version": "7.0.14",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.6.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz",
"integrity": "sha512-Nq/rNjnHFcKgCDDZYO0lNsl6YWe6U7tTy+ESN+PnLxebL8uBtYX59HZqvrj7YLK5UCyll2hqDsJOo3ndzEW8Ug==", "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==",
"dev": true, "dev": true,
"requires": { "requires": {
"chalk": "^2.4.1", "chalk": "^2.4.2",
"source-map": "^0.6.1", "source-map": "^0.6.1",
"supports-color": "^5.5.0" "supports-color": "^6.1.0"
}, },
"dependencies": { "dependencies": {
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
},
"dependencies": {
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
"source-map": { "source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true "dev": true
},
"supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
} }
} }
}, },
@@ -15331,9 +15404,9 @@
"optional": true "optional": true
}, },
"reflect-metadata": { "reflect-metadata": {
"version": "0.1.10", "version": "0.1.13",
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.10.tgz", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
"integrity": "sha1-tPg3BEFqytiZiMmxVjXUfgO5NEo=" "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg=="
}, },
"regenerate": { "regenerate": {
"version": "1.4.0", "version": "1.4.0",
@@ -15791,12 +15864,12 @@
}, },
"dependencies": { "dependencies": {
"resolve": { "resolve": {
"version": "1.8.1", "version": "1.10.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz",
"integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==",
"dev": true, "dev": true,
"requires": { "requires": {
"path-parse": "^1.0.5" "path-parse": "^1.0.6"
} }
} }
} }
@@ -15811,21 +15884,30 @@
} }
}, },
"rollup-plugin-node-resolve": { "rollup-plugin-node-resolve": {
"version": "3.4.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.4.0.tgz", "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.0.0.tgz",
"integrity": "sha512-PJcd85dxfSBWih84ozRtBkB731OjXk0KnzN0oGp7WOWcarAFkVa71cV5hTJg2qpVsV2U8EUwrzHP3tvy9vS3qg==", "integrity": "sha512-7Ni+/M5RPSUBfUaP9alwYQiIKnKeXCOHiqBpKUl9kwp3jX5ZJtgXAait1cne6pGEVUUztPD6skIKH9Kq9sNtfw==",
"dev": true, "dev": true,
"requires": { "requires": {
"builtin-modules": "^2.0.0", "builtin-modules": "^3.0.0",
"is-module": "^1.0.0", "is-module": "^1.0.0",
"resolve": "^1.1.6" "resolve": "^1.8.1"
}, },
"dependencies": { "dependencies": {
"builtin-modules": { "builtin-modules": {
"version": "2.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.0.0.tgz",
"integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==", "integrity": "sha512-hMIeU4K2ilbXV6Uv93ZZ0Avg/M91RaKXucQ+4me2Do1txxBDyDZWCBa5bJSLqoNTRpXTLwEzIk1KmloenDDjhg==",
"dev": true "dev": true
},
"resolve": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz",
"integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==",
"dev": true,
"requires": {
"path-parse": "^1.0.6"
}
} }
} }
}, },
@@ -15840,103 +15922,20 @@
} }
}, },
"rollup-pluginutils": { "rollup-pluginutils": {
"version": "2.3.3", "version": "2.4.1",
"resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.3.3.tgz", "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.4.1.tgz",
"integrity": "sha512-2XZwja7b6P5q4RZ5FhyX1+f46xi1Z3qBKigLRZ6VTZjwbN0K1IFGMlwm06Uu0Emcre2Z63l77nq/pzn+KxIEoA==", "integrity": "sha512-wesMQ9/172IJDIW/lYWm0vW0LiKe5Ekjws481R7z9WTRtmO59cqyM/2uUlxvf6yzm/fElFmHUobeQOYz46dZJw==",
"dev": true, "dev": true,
"requires": { "requires": {
"estree-walker": "^0.5.2", "estree-walker": "^0.6.0",
"micromatch": "^2.3.11" "micromatch": "^3.1.10"
}, },
"dependencies": { "dependencies": {
"arr-diff": { "estree-walker": {
"version": "2.0.0", "version": "0.6.0",
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.0.tgz",
"integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "integrity": "sha512-peq1RfVAVzr3PU/jL31RaOjUKLoZJpObQWJJ+LgfcxDUifyLZ1RjPQZTl0pzj2uJ45b7A7XpyppXvxdEqzo4rw==",
"dev": true,
"requires": {
"arr-flatten": "^1.0.1"
}
},
"array-unique": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
"integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=",
"dev": true "dev": true
},
"braces": {
"version": "1.8.5",
"resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
"integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=",
"dev": true,
"requires": {
"expand-range": "^1.8.1",
"preserve": "^0.2.0",
"repeat-element": "^1.1.2"
}
},
"expand-brackets": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz",
"integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=",
"dev": true,
"requires": {
"is-posix-bracket": "^0.1.0"
}
},
"extglob": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz",
"integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=",
"dev": true,
"requires": {
"is-extglob": "^1.0.0"
}
},
"is-extglob": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
"integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
"dev": true
},
"is-glob": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
"integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
"dev": true,
"requires": {
"is-extglob": "^1.0.0"
}
},
"kind-of": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"dev": true,
"requires": {
"is-buffer": "^1.1.5"
}
},
"micromatch": {
"version": "2.3.11",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz",
"integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=",
"dev": true,
"requires": {
"arr-diff": "^2.0.0",
"array-unique": "^0.2.1",
"braces": "^1.8.2",
"expand-brackets": "^0.1.4",
"extglob": "^0.3.1",
"filename-regex": "^2.0.0",
"is-extglob": "^1.0.0",
"is-glob": "^2.0.1",
"kind-of": "^3.0.2",
"normalize-path": "^2.0.1",
"object.omit": "^2.0.0",
"parse-glob": "^3.0.4",
"regex-cache": "^0.4.2"
}
} }
} }
}, },
@@ -17037,6 +17036,12 @@
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz",
"integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==" "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w=="
}, },
"spdx-license-list": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/spdx-license-list/-/spdx-license-list-5.0.0.tgz",
"integrity": "sha512-N5u9tEFRBUzQDjMKRRt8SHxC/UaqYApPmdF4MMFnICQg3z52onNbnneuro/sWw2rd+eGu9agQOzUbD671Xia7Q==",
"dev": true
},
"spdx-ranges": { "spdx-ranges": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-2.1.0.tgz", "resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-2.1.0.tgz",

View File

@@ -80,6 +80,7 @@
"@ngx-translate/core": "^11.0.0", "@ngx-translate/core": "^11.0.0",
"@nrwl/nx": "7.1.1", "@nrwl/nx": "7.1.1",
"@nrwl/schematics": "7.1.1", "@nrwl/schematics": "7.1.1",
"adf-monaco-extension": "0.0.8",
"adf-tslint-rules": "0.0.6", "adf-tslint-rules": "0.0.6",
"alfresco-js-api-node": "2.7.0-beta5", "alfresco-js-api-node": "2.7.0-beta5",
"chart.js": "2.5.0", "chart.js": "2.5.0",
@@ -91,11 +92,11 @@
"moment": "2.22.2", "moment": "2.22.2",
"moment-es6": "^1.0.0", "moment-es6": "^1.0.0",
"ng2-charts": "1.6.0", "ng2-charts": "1.6.0",
"ngx-monaco-editor": "6.0.0", "ngx-monaco-editor": "^6.0.0",
"pdfjs-dist": "^2.0.489", "pdfjs-dist": "^2.0.489",
"protractor-retry": "^1.2.0", "protractor-retry": "^1.2.0",
"raphael": "2.2.7", "raphael": "2.2.7",
"reflect-metadata": "0.1.10", "reflect-metadata": "0.1.13",
"rxjs": "^6.2.2", "rxjs": "^6.2.2",
"systemjs": "0.19.27", "systemjs": "0.19.27",
"web-animations-js": "2.3.1", "web-animations-js": "2.3.1",
@@ -154,7 +155,7 @@
"merge-stream": "1.0.1", "merge-stream": "1.0.1",
"nconf": "^0.10.0", "nconf": "^0.10.0",
"ncp": "^2.0.0", "ncp": "^2.0.0",
"ng-packagr": "4.4.5", "ng-packagr": "4.7.1",
"node-sass": "4.9.2", "node-sass": "4.9.2",
"protractor": "^5.4.0", "protractor": "^5.4.0",
"protractor-html-reporter-2": "^1.0.4", "protractor-html-reporter-2": "^1.0.4",

View File

@@ -4,11 +4,18 @@ eval BRANCH_NAME=""
eval HEAD_SHA_BRANCH="" eval HEAD_SHA_BRANCH=""
eval SHA_2="HEAD" eval SHA_2="HEAD"
eval DIRECTORY="tmp" eval DIRECTORY="tmp"
eval GNU=false
show_help() { show_help() {
echo "Usage: smart-build.sh" echo "Usage: affected-libs.sh"
echo "" echo ""
echo "-b branch name" echo "-b branch name"
echo "-gnu for gnu"
}
gnu_mode() {
echo "====== GNU MODE ====="
GNU=true
} }
branch_name(){ branch_name(){
@@ -18,10 +25,18 @@ branch_name(){
while [[ $1 == -* ]]; do while [[ $1 == -* ]]; do
case "$1" in case "$1" in
-b) branch_name $2; shift 2;; -b) branch_name $2; shift 2;;
-gnu) gnu_mode; shift;;
-*) echo "invalid option: $1" 1>&2; show_help; exit 0;; -*) echo "invalid option: $1" 1>&2; show_help; exit 0;;
esac esac
done done
if $GNU; then
sedi='-i'
else
sedi=('-i' '')
fi
if [[ "$BRANCH_NAME" == "" ]] if [[ "$BRANCH_NAME" == "" ]]
then then
echo "The branch name is mandatory" echo "The branch name is mandatory"
@@ -47,10 +62,10 @@ cat $DIRECTORY/deps.txt
#echo "extensions" > deps.txt #echo "extensions" > deps.txt
#clean file #clean file
sed -i '/^$/d' ./$DIRECTORY/deps.txt sed "${sedi[@]}" '/^$/d' ./$DIRECTORY/deps.txt
sed -i '/alfresco-components/d' ./$DIRECTORY/deps.txt sed "${sedi[@]}" '/alfresco-components/d' ./$DIRECTORY/deps.txt
sed -i '/nx affected:libs/d' ./$DIRECTORY/deps.txt sed "${sedi[@]}" '/nx affected:libs/d' ./$DIRECTORY/deps.txt
sed -i '/^$/d' ./$DIRECTORY/deps.txt sed "${sedi[@]}" '/^$/d' ./$DIRECTORY/deps.txt
#read result from file #read result from file
while IFS= read -r var while IFS= read -r var
@@ -61,6 +76,14 @@ done < "./$DIRECTORY/deps.txt"
#transform string to array #transform string to array
libs=(`echo $fileLine | sed 's/^$/\n/g'`) libs=(`echo $fileLine | sed 's/^$/\n/g'`)
#extensions
for i in "${libs[@]}"
do
if [ "$i" == "extensions" ] ; then
AFFECTED_LIBS=$AFFECTED_LIBS" extensions$"
fi
done
#core #core
for i in "${libs[@]}" for i in "${libs[@]}"
do do
@@ -95,14 +118,6 @@ do
fi fi
done done
#extensions
for i in "${libs[@]}"
do
if [ "$i" == "extensions" ] ; then
AFFECTED_LIBS=$AFFECTED_LIBS" extensions$"
fi
done
#process-services-cloud #process-services-cloud
for i in "${libs[@]}" for i in "${libs[@]}"
do do
@@ -111,4 +126,4 @@ do
fi fi
done done
echo "${AFFECTED_LIBS}" echo "AFFECTED LIBS => ${AFFECTED_LIBS}"

View File

@@ -6,7 +6,7 @@ cd $DIR/..
echo "====== Extensions ======" echo "====== Extensions ======"
echo "====== Build ======" echo "====== Build ======"
ng build extensions || exit 1 npm run ng-packagr -- -p ./lib/extensions/ || exit 1
echo "====== Move to node_modules ======" echo "====== Move to node_modules ======"
rm -rf ./node_modules/@alfresco/adf-extensions/ && \ rm -rf ./node_modules/@alfresco/adf-extensions/ && \

View File

@@ -6,7 +6,7 @@ cd $DIR/..
echo "====== Process Services Cloud ======" echo "====== Process Services Cloud ======"
echo "====== Build ======" echo "====== Build ======"
ng build process-services-cloud || exit 1 npm run ng-packagr -- -p ./lib/process-services-cloud/ || exit 1
echo "====== Build style ======" echo "====== Build style ======"
node ./lib/config/bundle-process-services-cloud-scss.js || exit 1 node ./lib/config/bundle-process-services-cloud-scss.js || exit 1

View File

@@ -3,24 +3,25 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR cd $DIR
echo "====== run lib ====="
echo "------ run core -----" echo "====== Run lib ====="
./build-core.sh
echo "------ run content-services -----" echo "====== Run extensions ====="
./build-content-services.sh
echo "------ Build process-services -----"
./build-process-services.sh
echo "------ run insights -----"
./build-insights.sh
echo "------ run extensions -----"
./build-extensions.sh ./build-extensions.sh
echo "------ run process-services-cloud -----" echo "====== run core ====="
./build-core.sh
echo "====== Run content-services ====="
./build-content-services.sh
echo "====== Run process-services ====="
./build-process-services.sh
echo "====== Run insights ====="
./build-insights.sh
echo "====== Run process-services-cloud ====="
./build-process-services-cloud.sh ./build-process-services-cloud.sh
echo "====== Copy schema =====" echo "====== Copy schema ====="

260
scripts/pr-reminder.js Normal file
View File

@@ -0,0 +1,260 @@
var program = require('commander');
var request = require('request');
function asyncRequest(option) {
return new Promise(function (resolve, reject) {
request(option, function (error, res, body) {
if (!error && (res.statusCode == 200 || res.statusCode == 201)) {
resolve(body);
} else {
console.log("Error " + JSON.stringify(body));
reject(error + JSON.stringify(body));
throw "Error";
}
});
});
}
async function main() {
program
.version('0.1.0')
.option('-n, --name [type]', 'Name to give at the service in rancher')
.option('-r, --remote [type]', 'Remote environment host adf.lab.com ')
.option('-e, --env [type]', 'Name to give at the service in rancher')
.option('-i, --image [type]', 'Docker image to load')
.option('-s, --server [type]', 'Server RANCHER_SERVER URL')
.option('-p, --password [type]', 'password RANCHER')
.option('-u, --username [type]', 'username RANCHER')
.parse(process.argv);
auth = 'Basic ' + new Buffer(program.username + ':' + program.password).toString('base64');
var project = await asyncRequest({
url: program.server + `/v1/project?name=${program.env}`,
method: 'GET',
json: true,
headers: {
"content-type": "application/json",
"accept": "application/json",
"Authorization": auth
},
body: ""
}).catch((error) => {
console.log('Project name error'+ error);
});
var stacks = await asyncRequest({
url: `${program.server}/v2-beta/projects/${project.data[0].id}/stacks?limit=-1&sort=name`,
method: 'GET',
json: true,
headers: {
"content-type": "application/json",
"accept": "application/json",
"Authorization": auth
},
body: ""
}).catch((error) => {
console.log('Stacks error'+ error);
});
var stackId = stacks.data[0].id;
var environmentId = project.data[0].id;
console.log("StackId " + stackId);
console.log("ID environment " + environmentId);
console.log("image to Load " + program.image);
var postData = {
"scale": 1,
"assignServiceIpAddress": false,
"startOnCreate": true,
"type": "service",
"stackId": stackId,
"launchConfig": {
"instanceTriggeredStop": "stop",
"kind": "container",
"networkMode": "managed",
"privileged": false,
"publishAllPorts": false,
"readOnly": false,
"runInit": false,
"startOnCreate": true,
"stdinOpen": true,
"tty": true,
"vcpu": 1,
"drainTimeoutMs": 0,
"type": "launchConfig",
"labels": {"io.rancher.container.pull_image": "always"},
"restartPolicy": {"name": "always"},
"secrets": [],
"dataVolumes": [],
"dataVolumesFrom": [],
"dns": [],
"dnsSearch": [],
"capAdd": [],
"capDrop": [],
"devices": [],
"logConfig": {"driver": "", "config": {}},
"dataVolumesFromLaunchConfigs": [],
"imageUuid": program.image,
"ports": [],
"blkioWeight": null,
"cgroupParent": null,
"count": null,
"cpuCount": null,
"cpuPercent": null,
"cpuPeriod": null,
"cpuQuota": null,
"cpuRealtimePeriod": null,
"cpuRealtimeRuntime": null,
"cpuSet": null,
"cpuSetMems": null,
"cpuShares": null,
"createIndex": null,
"created": null,
"deploymentUnitUuid": null,
"description": null,
"diskQuota": null,
"domainName": null,
"externalId": null,
"firstRunning": null,
"healthInterval": null,
"healthRetries": null,
"healthState": null,
"healthTimeout": null,
"hostname": null,
"ioMaximumBandwidth": null,
"ioMaximumIOps": null,
"ip": null,
"ip6": null,
"ipcMode": null,
"isolation": null,
"kernelMemory": null,
"memory": null,
"memoryMb": null,
"memoryReservation": null,
"memorySwap": null,
"memorySwappiness": null,
"milliCpuReservation": null,
"oomScoreAdj": null,
"pidMode": null,
"pidsLimit": null,
"removed": null,
"requestedIpAddress": null,
"shmSize": null,
"startCount": null,
"stopSignal": null,
"stopTimeout": null,
"user": null,
"userdata": null,
"usernsMode": null,
"uts": null,
"uuid": null,
"volumeDriver": null,
"workingDir": null,
"networkLaunchConfig": null
},
"secondaryLaunchConfigs": [],
"name": program.name,
"createIndex": null,
"created": null,
"description": null,
"externalId": null,
"healthState": null,
"kind": null,
"removed": null,
"selectorContainer": null,
"selectorLink": null,
"uuid": null,
"vip": null,
"fqdn": null
};
var createService = await asyncRequest({
url: `${program.server}/v2-beta/projects/${environmentId}/service`,
method: 'POST',
json: true,
headers: {
"content-type": "application/json",
"accept": "application/json",
"Authorization": auth
},
body: postData,
}).catch((error) => {
console.log('Error createService'+ error);
});
if (!createService) {
return;
}
console.log("New environment ID " + createService.id);
var loadBalancer = await asyncRequest({
url: `${program.server}/v1/projects/${environmentId}/loadbalancerservices`,
method: 'GET',
json: true,
headers: {
"content-type": "application/json",
"accept": "application/json",
"Authorization": auth
},
body: postData,
}).catch((error) => {
console.log('Error loadBalancer'+ error);
});
if (!loadBalancer) {
return;
}
var loadBalancerId = loadBalancer.data[0].id;
console.log("Load balancer ID " + loadBalancerId);
var loadBalancerGet = await asyncRequest({
url: `${program.server}/v2-beta/projects/${environmentId}/loadbalancerservices/${loadBalancerId}`,
method: 'GET',
json: true,
headers: {
"content-type": "application/json",
"accept": "application/json",
"Authorization": auth
}
}).catch((error) => {
console.log('Error get load balancer'+ error);
});
//console.log("Load balancer ID " + JSON.stringify(loadBalancerGet.lbConfig.portRules));
var newRule = {
"type": "portRule",
"hostname": program.remote,
"path": `/${program.name}`,
"priority": 1,
"protocol": "http",
"serviceId": createService.id,
"sourcePort": 80,
"targetPort": 80
};
loadBalancerGet.lbConfig.portRules.push(newRule);
await asyncRequest({
url: `${program.server}/v2-beta/projects/${environmentId}/loadbalancerservices/${loadBalancerId}`,
method: 'PUT',
json: true,
headers: {
"content-type": "application/json",
"accept": "application/json",
"Authorization": auth
},
body: loadBalancerGet
}).catch((error) => {
console.log('Error Update load balancer'+ error);
});
}
main();

View File

@@ -31,6 +31,14 @@ affected="$(./scripts/affected-libs.sh -b "$BRANCH_NAME")"
echo $affected echo $affected
libs=(`echo $affected | sed 's/^$/\n/g'`) libs=(`echo $affected | sed 's/^$/\n/g'`)
#extensions
for i in "${libs[@]}"
do
if [ "$i" == "extensions$" ] ; then
./scripts/build-extensions.sh || exit 1;
fi
done
#core #core
for i in "${libs[@]}" for i in "${libs[@]}"
do do
@@ -70,11 +78,3 @@ do
./scripts/build-insights.sh || exit 1; ./scripts/build-insights.sh || exit 1;
fi fi
done done
#extensions
for i in "${libs[@]}"
do
if [ "$i" == "extensions$" ] ; then
./scripts/build-extensions.sh || exit 1;
fi
done