diff --git a/angular.json b/angular.json index c346c144d7..97c40aa977 100644 --- a/angular.json +++ b/angular.json @@ -261,6 +261,7 @@ }, "assets": [ "demo-shell/src/assets", + "demo-shell/src/favicon-96x96.png", "demo-shell/src/app.config.json", { "glob": "**/*", @@ -430,6 +431,7 @@ ], "assets": [ "demo-shell/src/assets", + "demo-shell/src/favicon-96x96.png", "demo-shell/src/app.config.json", { "glob": "**/*", diff --git a/demo-shell/e2e/tsconfig.e2e.json b/demo-shell/e2e/tsconfig.e2e.json index ac7a373257..9c8dadd08a 100644 --- a/demo-shell/e2e/tsconfig.e2e.json +++ b/demo-shell/e2e/tsconfig.e2e.json @@ -6,6 +6,7 @@ "target": "es5", "types":[ "jasmine", + "jasminewd2", "node" ] } diff --git a/demo-shell/src/app/app.module.ts b/demo-shell/src/app/app.module.ts index eb4cd99688..6ae89117c8 100644 --- a/demo-shell/src/app/app.module.ts +++ b/demo-shell/src/app/app.module.ts @@ -55,7 +55,6 @@ import { TaskAttachmentsComponent } from './components/process-service/task-atta import { ProcessAttachmentsComponent } from './components/process-service/process-attachments.component'; import { SharedLinkViewComponent } from './components/shared-link-view/shared-link-view.component'; import { DemoPermissionComponent } from './components/permissions/demo-permissions.component'; -import { PreviewService } from './services/preview.service'; import { ReportIssueComponent } from './components/report-issue/report-issue.component'; import { MonacoEditorModule } from 'ngx-monaco-editor'; import { ContentModule } from '@alfresco/adf-content-services'; @@ -211,9 +210,7 @@ registerLocaleData(localeSv); name: 'lazy-loading', source: 'resources/lazy-loading' } - }, - PreviewService, - CoreAutomationService + } ], entryComponents: [ VersionManagerDialogAdapterComponent, diff --git a/demo-shell/src/app/components/cloud/cloud-viewer.component.ts b/demo-shell/src/app/components/cloud/cloud-viewer.component.ts index 14623f5330..7512eaadbc 100644 --- a/demo-shell/src/app/components/cloud/cloud-viewer.component.ts +++ b/demo-shell/src/app/components/cloud/cloud-viewer.component.ts @@ -16,8 +16,7 @@ */ import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { Params } from '@angular/router/src/shared'; +import { ActivatedRoute, Params } from '@angular/router'; @Component({ selector: 'app-cloud-viewer', diff --git a/demo-shell/src/app/components/cloud/community/community-processes-cloud.component.html b/demo-shell/src/app/components/cloud/community/community-processes-cloud.component.html index 1e2f6bfeec..29968208f5 100644 --- a/demo-shell/src/app/components/cloud/community/community-processes-cloud.component.html +++ b/demo-shell/src/app/components/cloud/community/community-processes-cloud.component.html @@ -17,7 +17,7 @@ [id]="editedFilter.processInstanceId" [status]="editedFilter.status" [name]="editedFilter.processName" - [businessKey]="editedFilter.businessKey" + [businessKey]="editedFilter['businessKey']" [lastModifiedFrom]="editedFilter.lastModifiedFrom" [lastModifiedTo]="editedFilter.lastModifiedTo" [sorting]="sortArray" diff --git a/demo-shell/src/app/components/cloud/community/community-processes-cloud.component.ts b/demo-shell/src/app/components/cloud/community/community-processes-cloud.component.ts index 3ab9bab773..c604def8da 100644 --- a/demo-shell/src/app/components/cloud/community/community-processes-cloud.component.ts +++ b/demo-shell/src/app/components/cloud/community/community-processes-cloud.component.ts @@ -50,7 +50,7 @@ export class CommunityProcessesCloudDemoComponent implements OnInit, OnDestroy { selectedRow: any; multiselect: boolean; selectionMode: string; - selectedRows: string[] = []; + selectedRows: any[] = []; testingMode: boolean; processFilterProperties: any = { filterProperties: [], sortProperties: [], actions: [] }; diff --git a/demo-shell/src/app/components/cloud/processes-cloud-demo.component.html b/demo-shell/src/app/components/cloud/processes-cloud-demo.component.html index b4442e2172..ebc845004f 100644 --- a/demo-shell/src/app/components/cloud/processes-cloud-demo.component.html +++ b/demo-shell/src/app/components/cloud/processes-cloud-demo.component.html @@ -19,7 +19,7 @@ [id]="editedFilter.processInstanceId" [status]="editedFilter.status" [name]="editedFilter.processName" - [businessKey]="editedFilter.businessKey" + [businessKey]="editedFilter['businessKey']" [lastModifiedFrom]="editedFilter.lastModifiedFrom" [lastModifiedTo]="editedFilter.lastModifiedTo" [sorting]="sortArray" diff --git a/demo-shell/src/app/components/cloud/processes-cloud-demo.component.ts b/demo-shell/src/app/components/cloud/processes-cloud-demo.component.ts index 6c86edbe66..bef4b8a9bd 100644 --- a/demo-shell/src/app/components/cloud/processes-cloud-demo.component.ts +++ b/demo-shell/src/app/components/cloud/processes-cloud-demo.component.ts @@ -54,7 +54,7 @@ export class ProcessesCloudDemoComponent implements OnInit, OnDestroy { selectedRow: any; multiselect: boolean; selectionMode: string; - selectedRows: string[] = []; + selectedRows: any[] = []; testingMode: boolean; actionMenu: boolean; contextMenu: boolean; diff --git a/demo-shell/src/app/components/file-view/file-view.component.html b/demo-shell/src/app/components/file-view/file-view.component.html index 0c0214f5e9..2a51337d31 100644 --- a/demo-shell/src/app/components/file-view/file-view.component.html +++ b/demo-shell/src/app/components/file-view/file-view.component.html @@ -108,7 +108,7 @@ + (uploadError)="onUploadError($event)"> diff --git a/demo-shell/src/app/components/files/files.component.html b/demo-shell/src/app/components/files/files.component.html index 06e49890d0..34611d4972 100644 --- a/demo-shell/src/app/components/files/files.component.html +++ b/demo-shell/src/app/components/files/files.component.html @@ -446,7 +446,7 @@ + [loading]="documentList.loading"> {{ 'ADF-DOCUMENT-LIST.LAYOUT.LOAD_MORE' | translate }} diff --git a/demo-shell/src/app/components/pipes/pipes.component.html b/demo-shell/src/app/components/pipes/pipes.component.html index b1c6e6cf31..f31951412d 100644 --- a/demo-shell/src/app/components/pipes/pipes.component.html +++ b/demo-shell/src/app/components/pipes/pipes.component.html @@ -99,7 +99,7 @@
{{ number | adfDecimalNumber : decimalValues }}

AdfDecimalNumber Pipe - Custom locale

-
{{ number | adfDecimalNumber : {} : locale }}
+
{{ number | adfDecimalNumber : null : locale }}

AdfDecimalNumber Pipe - Custom digits config and locale

{{ number | adfDecimalNumber : decimalValues : locale }}
diff --git a/demo-shell/src/app/components/process-service/process-service.component.html b/demo-shell/src/app/components/process-service/process-service.component.html index 4b9c970ddd..eb75d68587 100644 --- a/demo-shell/src/app/components/process-service/process-service.component.html +++ b/demo-shell/src/app/components/process-service/process-service.component.html @@ -16,7 +16,7 @@ - + @@ -132,7 +132,7 @@ - + diff --git a/demo-shell/src/app/components/search/search-config-test.service.ts b/demo-shell/src/app/components/search/search-config-test.service.ts index eef870de73..da3c92cf3c 100644 --- a/demo-shell/src/app/components/search/search-config-test.service.ts +++ b/demo-shell/src/app/components/search/search-config-test.service.ts @@ -17,12 +17,11 @@ import { QueryBody } from '@alfresco/js-api'; import { SearchConfigurationInterface } from '@alfresco/adf-core'; +import { Injectable } from '@angular/core'; +@Injectable() export class TestSearchConfigurationService implements SearchConfigurationInterface { - constructor() { - } - public generateQueryBody(searchTerm: string, maxResults: number, skipCount: number): QueryBody { const defaultQueryBody: QueryBody = { query: { diff --git a/demo-shell/src/app/components/search/search-extended.component.html b/demo-shell/src/app/components/search/search-extended.component.html index 128b9a239b..f855401e48 100644 --- a/demo-shell/src/app/components/search/search-extended.component.html +++ b/demo-shell/src/app/components/search/search-extended.component.html @@ -11,7 +11,7 @@ class="app-example-card-search-container"> + *ngFor="let item of data?.list?.entries; let idx = index">
{{ item?.entry.name }} diff --git a/demo-shell/src/app/components/theme-picker/style-manager/style-manager.ts b/demo-shell/src/app/components/theme-picker/style-manager/style-manager.ts index 1f9f7ac0d5..bdbf485bea 100644 --- a/demo-shell/src/app/components/theme-picker/style-manager/style-manager.ts +++ b/demo-shell/src/app/components/theme-picker/style-manager/style-manager.ts @@ -21,7 +21,7 @@ import { Injectable } from '@angular/core'; * Class for managing stylesheets. Stylesheets are loaded into named slots so that they can be * removed or changed later. */ -@Injectable() +@Injectable({ providedIn: 'root' }) export class StyleManager { /** * Set the stylesheet with the specified key. diff --git a/demo-shell/src/app/components/theme-picker/theme-picker.ts b/demo-shell/src/app/components/theme-picker/theme-picker.ts index fdd02a3f3d..96510d1776 100644 --- a/demo-shell/src/app/components/theme-picker/theme-picker.ts +++ b/demo-shell/src/app/components/theme-picker/theme-picker.ts @@ -144,8 +144,7 @@ export class ThemePickerComponent { CommonModule ], exports: [ThemePickerComponent], - declarations: [ThemePickerComponent], - providers: [StyleManager, ThemeStorage] + declarations: [ThemePickerComponent] }) export class ThemePickerModule { } diff --git a/demo-shell/src/app/components/theme-picker/theme-storage/theme-storage.ts b/demo-shell/src/app/components/theme-picker/theme-storage/theme-storage.ts index a505351daa..cd4d0b758a 100644 --- a/demo-shell/src/app/components/theme-picker/theme-storage/theme-storage.ts +++ b/demo-shell/src/app/components/theme-picker/theme-storage/theme-storage.ts @@ -26,13 +26,13 @@ export interface DocsSiteTheme { isDefault?: boolean; } -@Injectable() +@Injectable({ providedIn: 'root' }) export class ThemeStorage { static storageKey = 'docs-theme-storage-current'; - public onThemeUpdate: EventEmitter = new EventEmitter(); + onThemeUpdate = new EventEmitter(); - public storeTheme(theme: DocsSiteTheme) { + storeTheme(theme: DocsSiteTheme) { try { window.localStorage[ThemeStorage.storageKey] = JSON.stringify(theme); } catch (e) { } @@ -40,7 +40,7 @@ export class ThemeStorage { this.onThemeUpdate.emit(theme); } - public getStoredTheme(): DocsSiteTheme { + getStoredTheme(): DocsSiteTheme { try { return JSON.parse(window.localStorage[ThemeStorage.storageKey] || null); } catch (e) { @@ -48,7 +48,7 @@ export class ThemeStorage { } } - public clearStorage() { + clearStorage() { try { window.localStorage.removeItem(ThemeStorage.storageKey); } catch (e) { } diff --git a/demo-shell/src/app/services/preview.service.ts b/demo-shell/src/app/services/preview.service.ts index a6a4637bd9..9e06247d57 100644 --- a/demo-shell/src/app/services/preview.service.ts +++ b/demo-shell/src/app/services/preview.service.ts @@ -18,7 +18,7 @@ import { Injectable } from '@angular/core'; import { Router } from '@angular/router'; -@Injectable() +@Injectable({ providedIn: 'root' }) export class PreviewService { public content: Blob = null; diff --git a/lib/cli/package-lock.json b/lib/cli/package-lock.json index e4d31719a5..d042ae6e6b 100644 --- a/lib/cli/package-lock.json +++ b/lib/cli/package-lock.json @@ -2957,6 +2957,12 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "typescript": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.1.6.tgz", + "integrity": "sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA==", + "dev": true + }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", diff --git a/lib/cli/package.json b/lib/cli/package.json index 4033385e0d..110db394c2 100644 --- a/lib/cli/package.json +++ b/lib/cli/package.json @@ -35,6 +35,7 @@ ], "license": "Apache-2.0", "devDependencies": { - "@types/shelljs": "^0.8.7" + "@types/shelljs": "^0.8.7", + "typescript": "3.1.6" } } diff --git a/lib/content-services/ng-package.json b/lib/content-services/ng-package.json index df9245fab5..808520bc4a 100644 --- a/lib/content-services/ng-package.json +++ b/lib/content-services/ng-package.json @@ -2,7 +2,6 @@ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", "dest": "../dist/content-services", "lib": { - "languageLevel": [ "dom", "es2017" ], "entryFile": "src/public-api.ts", "flatModuleFile": "adf-content-services", "umdModuleIds": { diff --git a/lib/content-services/src/lib/content-metadata/public-api.ts b/lib/content-services/src/lib/content-metadata/public-api.ts index b3ef5f30b1..3c563fc2bb 100644 --- a/lib/content-services/src/lib/content-metadata/public-api.ts +++ b/lib/content-services/src/lib/content-metadata/public-api.ts @@ -15,6 +15,7 @@ * limitations under the License. */ +export * from './components/content-metadata/content-metadata.component'; export * from './components/content-metadata-card/content-metadata-card.component'; export * from './services/basic-properties.service'; export * from './services/content-metadata.service'; diff --git a/lib/content-services/src/lib/content-metadata/services/property-groups-translator.service.spec.ts b/lib/content-services/src/lib/content-metadata/services/property-groups-translator.service.spec.ts index 3963ddf182..71db2b34d0 100644 --- a/lib/content-services/src/lib/content-metadata/services/property-groups-translator.service.spec.ts +++ b/lib/content-services/src/lib/content-metadata/services/property-groups-translator.service.spec.ts @@ -37,19 +37,14 @@ describe('PropertyGroupTranslatorService', () => { let propertyGroup: OrganisedPropertyGroup; let property: Property; let propertyValues: { [key: string]: any }; + let logService: LogService; setupTestBed({ - imports: [ContentTestingModule], - providers: [ - { - provide: LogService, useValue: { - error: () => {} - } - } - ] + imports: [ContentTestingModule] }); beforeEach(() => { + logService = TestBed.get(LogService); service = TestBed.get(PropertyGroupTranslatorService); property = { @@ -135,7 +130,6 @@ describe('PropertyGroupTranslatorService', () => { }); it('should log an error if unrecognised type is found', () => { - const logService = TestBed.get(LogService); spyOn(logService, 'error').and.stub(); property.name = 'FAS:PLAGUE'; diff --git a/lib/content-services/src/lib/directives/public-api.ts b/lib/content-services/src/lib/directives/public-api.ts index 1ab07b20a3..476da38cbb 100644 --- a/lib/content-services/src/lib/directives/public-api.ts +++ b/lib/content-services/src/lib/directives/public-api.ts @@ -16,3 +16,4 @@ */ export * from './content-directive.module'; +export * from './node-lock.directive'; diff --git a/lib/content-services/src/lib/document-list/data/share-datatable-adapter.spec.ts b/lib/content-services/src/lib/document-list/data/share-datatable-adapter.spec.ts index b427ca578b..61c815ac0a 100644 --- a/lib/content-services/src/lib/document-list/data/share-datatable-adapter.spec.ts +++ b/lib/content-services/src/lib/document-list/data/share-datatable-adapter.spec.ts @@ -19,58 +19,16 @@ import { DataColumn, DataRow, DataSorting, ContentService, ThumbnailService, set import { FileNode, FolderNode, SmartFolderNode, RuleFolderNode, LinkFolderNode } from './../../mock'; import { ShareDataRow } from './share-data-row.model'; import { ShareDataTableAdapter } from './share-datatable-adapter'; -import { DomSanitizer } from '@angular/platform-browser'; -import { MatIconRegistry } from '@angular/material'; import { ContentTestingModule } from '../../testing/content.testing.module'; import { TestBed } from '@angular/core/testing'; -class FakeSanitizer extends DomSanitizer { - - constructor() { - super(); - } - - sanitize(html) { - return html; - } - - bypassSecurityTrustHtml(value: string): any { - return value; - } - - bypassSecurityTrustStyle(): any { - return null; - } - - bypassSecurityTrustScript(): any { - return null; - } - - bypassSecurityTrustUrl(): any { - return null; - } - - bypassSecurityTrustResourceUrl(): any { - return null; - } -} - describe('ShareDataTableAdapter', () => { let thumbnailService: ThumbnailService; let contentService: ContentService; setupTestBed({ - imports: [ContentTestingModule], - providers: [ - { - provide: MatIconRegistry, - useValue: jasmine.createSpyObj(['addSvgIcon', 'addSvgIconInNamespace']) - }, - { - provide: DomSanitizer, useClass: FakeSanitizer - } - ] + imports: [ContentTestingModule] }); beforeEach(() => { diff --git a/lib/content-services/src/lib/document-list/services/node-actions.service.spec.ts b/lib/content-services/src/lib/document-list/services/node-actions.service.spec.ts index 5501a43c5f..8e318e530d 100644 --- a/lib/content-services/src/lib/document-list/services/node-actions.service.spec.ts +++ b/lib/content-services/src/lib/document-list/services/node-actions.service.spec.ts @@ -44,9 +44,6 @@ describe('NodeActionsService', () => { DialogModule ], providers: [ - NodeActionsService, - DocumentListService, - ContentNodeDialogService, { provide: MatDialogRef, useValue: dialogRef } ] }); diff --git a/lib/content-services/src/lib/folder-directive/folder-create.directive.spec.ts b/lib/content-services/src/lib/folder-directive/folder-create.directive.spec.ts index f7462d82a2..679ed4f92d 100644 --- a/lib/content-services/src/lib/folder-directive/folder-create.directive.spec.ts +++ b/lib/content-services/src/lib/folder-directive/folder-create.directive.spec.ts @@ -70,9 +70,6 @@ describe('FolderCreateDirective', () => { TestComponent, FolderDialogComponent, FolderCreateDirective - ], - providers: [ - ContentService ] }); diff --git a/lib/content-services/src/lib/permission-manager/components/add-permission/add-permission-panel.component.spec.ts b/lib/content-services/src/lib/permission-manager/components/add-permission/add-permission-panel.component.spec.ts index b8aad030ed..d978182a1a 100644 --- a/lib/content-services/src/lib/permission-manager/components/add-permission/add-permission-panel.component.spec.ts +++ b/lib/content-services/src/lib/permission-manager/components/add-permission/add-permission-panel.component.spec.ts @@ -18,7 +18,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { AddPermissionPanelComponent } from './add-permission-panel.component'; import { By } from '@angular/platform-browser'; -import { SearchService, setupTestBed, SearchConfigurationService } from '@alfresco/adf-core'; +import { SearchService, setupTestBed } from '@alfresco/adf-core'; import { of } from 'rxjs'; import { fakeAuthorityListResult, fakeNameListResult } from '../../../mock/add-permission.component.mock'; import { ContentTestingModule } from '../../../testing/content.testing.module'; @@ -33,8 +33,7 @@ describe('AddPermissionPanelComponent', () => { let debugElement: DebugElement; setupTestBed({ - imports: [ContentTestingModule], - providers: [SearchService, SearchConfigurationService] + imports: [ContentTestingModule] }); beforeEach(() => { diff --git a/lib/content-services/src/lib/permission-manager/components/add-permission/search-config-permission.service.ts b/lib/content-services/src/lib/permission-manager/components/add-permission/search-config-permission.service.ts index 991d5a033f..76454cc1b7 100644 --- a/lib/content-services/src/lib/permission-manager/components/add-permission/search-config-permission.service.ts +++ b/lib/content-services/src/lib/permission-manager/components/add-permission/search-config-permission.service.ts @@ -17,12 +17,11 @@ import { QueryBody } from '@alfresco/js-api'; import { SearchConfigurationInterface } from '@alfresco/adf-core'; +import { Injectable } from '@angular/core'; +@Injectable() export class SearchPermissionConfigurationService implements SearchConfigurationInterface { - constructor() { - } - public generateQueryBody(searchTerm: string, maxResults: number, skipCount: number): QueryBody { const defaultQueryBody: QueryBody = { query: { diff --git a/lib/content-services/src/lib/permission-manager/services/node-permission.service.spec.ts b/lib/content-services/src/lib/permission-manager/services/node-permission.service.spec.ts index c1bf607c66..8f9e292396 100644 --- a/lib/content-services/src/lib/permission-manager/services/node-permission.service.spec.ts +++ b/lib/content-services/src/lib/permission-manager/services/node-permission.service.spec.ts @@ -23,7 +23,6 @@ import { of } from 'rxjs'; import { fakeEmptyResponse, fakeNodeWithOnlyLocally, fakeSiteRoles, fakeSiteNodeResponse, fakeNodeToRemovePermission, fakeNodeWithoutPermissions } from '../../mock/permission-list.component.mock'; import { fakeAuthorityResults } from '../../mock/add-permission.component.mock'; -import { NodePermissionDialogService } from './node-permission-dialog.service'; describe('NodePermissionService', () => { @@ -34,10 +33,6 @@ describe('NodePermissionService', () => { setupTestBed({ imports: [ CoreModule.forRoot() - ], - providers: [ - NodePermissionDialogService, - NodePermissionService ] }); diff --git a/lib/content-services/src/lib/search/public-api.ts b/lib/content-services/src/lib/search/public-api.ts index 727a8e9987..3b3fa1770a 100644 --- a/lib/content-services/src/lib/search/public-api.ts +++ b/lib/content-services/src/lib/search/public-api.ts @@ -15,23 +15,33 @@ * limitations under the License. */ -export { FacetFieldBucket } from './facet-field-bucket.interface'; -export { FacetField } from './facet-field.interface'; -export { FacetQuery } from './facet-query.interface'; -export { FilterQuery } from './filter-query.interface'; -export { SearchCategory } from './search-category.interface'; -export { SearchWidgetSettings } from './search-widget-settings.interface'; -export { SearchWidget } from './search-widget.interface'; -export { SearchConfiguration } from './search-configuration.interface'; -export { SearchQueryBuilderService } from './search-query-builder.service'; -export { SearchRange } from './search-range.interface'; +export * from './facet-field-bucket.interface'; +export * from './facet-field.interface'; +export * from './facet-query.interface'; +export * from './filter-query.interface'; +export * from './search-category.interface'; +export * from './search-widget-settings.interface'; +export * from './search-widget.interface'; +export * from './search-configuration.interface'; +export * from './search-query-builder.service'; +export * from './search-range.interface'; export * from './components/search.component'; export * from './components/search-control.component'; export * from './components/empty-search-result.component'; +export * from './components/search-control.component'; +export * from './components/search.component'; +export * from './components/search-check-list/search-check-list.component'; +export * from './components/search-chip-list/search-chip-list.component'; +export * from './components/search-date-range/search-date-range.component'; export * from './components/search-filter/search-filter.component'; export * from './components/search-filter/search-filter.service'; +export * from './components/search-number-range/search-number-range.component'; +export * from './components/search-radio/search-radio.component'; +export * from './components/search-slider/search-slider.component'; export * from './components/search-chip-list/search-chip-list.component'; export * from './components/search-sorting-picker/search-sorting-picker.component'; +export * from './components/search-text/search-text.component'; +export * from './components/search-widget-container/search-widget-container.component'; export * from './search.module'; diff --git a/lib/content-services/src/lib/search/search.module.ts b/lib/content-services/src/lib/search/search.module.ts index 1a7f7e9ec0..8bb1c18413 100644 --- a/lib/content-services/src/lib/search/search.module.ts +++ b/lib/content-services/src/lib/search/search.module.ts @@ -36,14 +36,6 @@ import { SearchCheckListComponent } from './components/search-check-list/search- import { SearchDateRangeComponent } from './components/search-date-range/search-date-range.component'; import { SearchSortingPickerComponent } from './components/search-sorting-picker/search-sorting-picker.component'; -export const ALFRESCO_SEARCH_DIRECTIVES: any[] = [ - SearchComponent, - SearchControlComponent, - EmptySearchResultComponent, - SearchFilterComponent, - SearchChipListComponent -]; - @NgModule({ imports: [ CommonModule, @@ -53,7 +45,11 @@ export const ALFRESCO_SEARCH_DIRECTIVES: any[] = [ CoreModule ], declarations: [ - ...ALFRESCO_SEARCH_DIRECTIVES, + SearchComponent, + SearchControlComponent, + EmptySearchResultComponent, + SearchFilterComponent, + SearchChipListComponent, SearchWidgetContainerComponent, SearchTextComponent, SearchRadioComponent, @@ -64,7 +60,11 @@ export const ALFRESCO_SEARCH_DIRECTIVES: any[] = [ SearchSortingPickerComponent ], exports: [ - ...ALFRESCO_SEARCH_DIRECTIVES, + SearchComponent, + SearchControlComponent, + EmptySearchResultComponent, + SearchFilterComponent, + SearchChipListComponent, SearchWidgetContainerComponent, SearchTextComponent, SearchRadioComponent, diff --git a/lib/content-services/src/lib/upload/components/file-uploading-dialog.component.spec.ts b/lib/content-services/src/lib/upload/components/file-uploading-dialog.component.spec.ts index fb27973d91..23018dcadd 100644 --- a/lib/content-services/src/lib/upload/components/file-uploading-dialog.component.spec.ts +++ b/lib/content-services/src/lib/upload/components/file-uploading-dialog.component.spec.ts @@ -39,8 +39,7 @@ describe('FileUploadingDialogComponent', () => { UploadModule ], providers: [ - { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }, - UserPreferencesService + { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock } ] }); diff --git a/lib/content-services/src/lib/upload/components/upload-button.component.spec.ts b/lib/content-services/src/lib/upload/components/upload-button.component.spec.ts index 050fb7622a..ca786c6d3d 100644 --- a/lib/content-services/src/lib/upload/components/upload-button.component.spec.ts +++ b/lib/content-services/src/lib/upload/components/upload-button.component.spec.ts @@ -59,8 +59,6 @@ describe('UploadButtonComponent', () => { UploadButtonComponent ], providers: [ - UploadService, - ContentService, { provide: TranslationService, useClass: TranslationMock } ] }); diff --git a/lib/content-services/src/lib/upload/components/upload-drag-area.component.spec.ts b/lib/content-services/src/lib/upload/components/upload-drag-area.component.spec.ts index 2a67c93c6e..ecd31ff1cf 100644 --- a/lib/content-services/src/lib/upload/components/upload-drag-area.component.spec.ts +++ b/lib/content-services/src/lib/upload/components/upload-drag-area.component.spec.ts @@ -27,7 +27,6 @@ import { import { FileDraggableDirective } from '../directives/file-draggable.directive'; import { UploadDragAreaComponent } from './upload-drag-area.component'; -import { throwError } from 'rxjs'; function getFakeShareDataRow(allowableOperations = ['delete', 'update', 'create']) { return { @@ -111,7 +110,6 @@ describe('UploadDragAreaComponent', () => { UploadDragAreaComponent ], providers: [ - UploadService, { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock } ] }); @@ -417,7 +415,6 @@ describe('UploadDragAreaComponent', () => { }; fixture.detectChanges(); - spyOn(uploadService, 'fileUploadError').and.returnValue(throwError(new Error())); component.error.subscribe((error) => { expect(error).not.toBeNull(); diff --git a/lib/core/card-view/services/card-view-update.service.spec.ts b/lib/core/card-view/services/card-view-update.service.spec.ts index 4157bcb752..574ca68db2 100644 --- a/lib/core/card-view/services/card-view-update.service.spec.ts +++ b/lib/core/card-view/services/card-view-update.service.spec.ts @@ -18,7 +18,6 @@ import { async, TestBed } from '@angular/core/testing'; import { CardViewBaseItemModel } from '../models/card-view-baseitem.model'; import { CardViewUpdateService, transformKeyToObject } from './card-view-update.service'; -import { setupTestBed } from '../../testing/setup-test-bed'; describe('CardViewUpdateService', () => { @@ -59,12 +58,6 @@ describe('CardViewUpdateService', () => { clickable: false }; - setupTestBed({ - providers: [ - CardViewUpdateService - ] - }); - beforeEach(() => { cardViewUpdateService = TestBed.get(CardViewUpdateService); }); diff --git a/lib/core/clipboard/clipboard.directive.spec.ts b/lib/core/clipboard/clipboard.directive.spec.ts index b861c9e197..132c14bc01 100644 --- a/lib/core/clipboard/clipboard.directive.spec.ts +++ b/lib/core/clipboard/clipboard.directive.spec.ts @@ -47,9 +47,6 @@ describe('ClipboardDirective', () => { ], declarations: [ TestTargetClipboardComponent - ], - providers: [ - ClipboardService ] }); diff --git a/lib/core/clipboard/clipboard.module.ts b/lib/core/clipboard/clipboard.module.ts index 9ebc6fa490..4e1bb680a7 100644 --- a/lib/core/clipboard/clipboard.module.ts +++ b/lib/core/clipboard/clipboard.module.ts @@ -18,7 +18,6 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { ClipboardDirective, ClipboardComponent } from './clipboard.directive'; -import { ClipboardService } from './clipboard.service'; import { TranslateModule } from '@ngx-translate/core'; @NgModule({ @@ -26,9 +25,6 @@ import { TranslateModule } from '@ngx-translate/core'; CommonModule, TranslateModule.forChild() ], - providers: [ - ClipboardService - ], declarations: [ ClipboardDirective, ClipboardComponent diff --git a/lib/core/clipboard/clipboard.service.spec.ts b/lib/core/clipboard/clipboard.service.spec.ts index 202b2675e8..5158ee574f 100644 --- a/lib/core/clipboard/clipboard.service.spec.ts +++ b/lib/core/clipboard/clipboard.service.spec.ts @@ -15,7 +15,6 @@ * limitations under the License. */ -import { LogService } from '../services/log.service'; import { NotificationService } from '../notifications/services/notification.service'; import { AppConfigService } from '../app-config/app-config.service'; import { TestBed } from '@angular/core/testing'; @@ -40,10 +39,8 @@ describe('ClipboardService', () => { MatSnackBarModule ], providers: [ - LogService, { provide: TranslationService, useClass: TranslationMock }, - { provide: AppConfigService, useClass: AppConfigServiceMock }, - NotificationService + { provide: AppConfigService, useClass: AppConfigServiceMock } ] }); diff --git a/lib/core/clipboard/clipboard.service.ts b/lib/core/clipboard/clipboard.service.ts index 4ec693b8b6..05ece99b6c 100644 --- a/lib/core/clipboard/clipboard.service.ts +++ b/lib/core/clipboard/clipboard.service.ts @@ -20,7 +20,7 @@ import { DOCUMENT } from '@angular/common'; import { LogService } from '../services/log.service'; import { NotificationService } from '../notifications/services/notification.service'; -@Injectable() +@Injectable({ providedIn: 'root' }) export class ClipboardService { constructor( diff --git a/lib/core/form/components/widgets/amount/amount.widget.ts b/lib/core/form/components/widgets/amount/amount.widget.ts index c91b91756c..bb02836bbf 100644 --- a/lib/core/form/components/widgets/amount/amount.widget.ts +++ b/lib/core/form/components/widgets/amount/amount.widget.ts @@ -19,7 +19,7 @@ import { Component, OnInit, ViewEncapsulation, InjectionToken, Inject, Optional } from '@angular/core'; import { FormService } from './../../../services/form.service'; -import { baseHost , WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; export interface AmountWidgetSettings { showReadonlyPlaceholder: boolean; @@ -31,7 +31,17 @@ export const ADF_AMOUNT_SETTINGS = new InjectionToken('adf selector: 'amount-widget', templateUrl: './amount.widget.html', styleUrls: ['./amount.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class AmountWidgetComponent extends WidgetComponent implements OnInit { diff --git a/lib/core/form/components/widgets/checkbox/checkbox.widget.ts b/lib/core/form/components/widgets/checkbox/checkbox.widget.ts index e629dc6813..b25d33576a 100644 --- a/lib/core/form/components/widgets/checkbox/checkbox.widget.ts +++ b/lib/core/form/components/widgets/checkbox/checkbox.widget.ts @@ -19,12 +19,22 @@ import { Component, ViewEncapsulation } from '@angular/core'; import { FormService } from './../../../services/form.service'; -import { baseHost, WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; @Component({ selector: 'checkbox-widget', templateUrl: './checkbox.widget.html', - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class CheckboxWidgetComponent extends WidgetComponent { diff --git a/lib/core/form/components/widgets/container/container.widget.ts b/lib/core/form/components/widgets/container/container.widget.ts index 74bacbffd7..1293c2fe3d 100644 --- a/lib/core/form/components/widgets/container/container.widget.ts +++ b/lib/core/form/components/widgets/container/container.widget.ts @@ -20,14 +20,24 @@ import { AfterViewInit, Component, OnInit, ViewEncapsulation } from '@angular/core'; import { FormService } from './../../../services/form.service'; import { FormFieldModel } from './../core/form-field.model'; -import { baseHost , WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; import { ContainerWidgetComponentModel } from './container.widget.model'; @Component({ selector: 'container-widget', templateUrl: './container.widget.html', styleUrls: ['./container.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class ContainerWidgetComponent extends WidgetComponent implements OnInit, AfterViewInit { diff --git a/lib/core/form/components/widgets/date/date.widget.ts b/lib/core/form/components/widgets/date/date.widget.ts index 741a1e72e8..335bf38fa7 100644 --- a/lib/core/form/components/widgets/date/date.widget.ts +++ b/lib/core/form/components/widgets/date/date.widget.ts @@ -25,7 +25,7 @@ import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material'; import moment from 'moment-es6'; import { Moment } from 'moment'; import { FormService } from './../../../services/form.service'; -import { baseHost, WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; @@ -36,7 +36,17 @@ import { takeUntil } from 'rxjs/operators'; { provide: MAT_DATE_FORMATS, useValue: MOMENT_DATE_FORMATS }], templateUrl: './date.widget.html', styleUrls: ['./date.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class DateWidgetComponent extends WidgetComponent implements OnInit, OnDestroy { diff --git a/lib/core/form/components/widgets/display-text/display-text.widget.ts b/lib/core/form/components/widgets/display-text/display-text.widget.ts index 262cbc1322..3062cc9c61 100644 --- a/lib/core/form/components/widgets/display-text/display-text.widget.ts +++ b/lib/core/form/components/widgets/display-text/display-text.widget.ts @@ -19,13 +19,23 @@ import { Component, ViewEncapsulation } from '@angular/core'; import { FormService } from './../../../services/form.service'; -import { baseHost , WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; @Component({ selector: 'display-text-widget', templateUrl: './display-text.widget.html', styleUrls: ['./display-text.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class DisplayTextWidgetComponent extends WidgetComponent { diff --git a/lib/core/form/components/widgets/document/document.widget.ts b/lib/core/form/components/widgets/document/document.widget.ts index cffe3166b9..64a55c2ffe 100644 --- a/lib/core/form/components/widgets/document/document.widget.ts +++ b/lib/core/form/components/widgets/document/document.widget.ts @@ -17,12 +17,22 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { FormService } from './../../../services/form.service'; -import { baseHost , WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; @Component({ selector: 'adf-form-document-widget', templateUrl: 'document.widget.html', - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class DocumentWidgetComponent extends WidgetComponent implements OnInit { diff --git a/lib/core/form/components/widgets/dropdown/dropdown.widget.ts b/lib/core/form/components/widgets/dropdown/dropdown.widget.ts index 2df258a7f6..03d4d467ba 100644 --- a/lib/core/form/components/widgets/dropdown/dropdown.widget.ts +++ b/lib/core/form/components/widgets/dropdown/dropdown.widget.ts @@ -21,13 +21,23 @@ import { LogService } from '../../../../services/log.service'; import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { FormService } from '../../../services/form.service'; import { FormFieldOption } from './../core/form-field-option'; -import { baseHost , WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; @Component({ selector: 'dropdown-widget', templateUrl: './dropdown.widget.html', styleUrls: ['./dropdown.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class DropdownWidgetComponent extends WidgetComponent implements OnInit { diff --git a/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.ts b/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.ts index 91476637c2..c8fd997daf 100644 --- a/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.ts +++ b/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.ts @@ -21,7 +21,7 @@ import { LogService } from '../../../../services/log.service'; import { ChangeDetectorRef, Component, ElementRef, OnInit, ViewEncapsulation } from '@angular/core'; import { WidgetVisibilityService } from '../../../services/widget-visibility.service'; import { FormService } from './../../../services/form.service'; -import { baseHost, WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; import { DynamicTableColumn } from './dynamic-table-column.model'; import { DynamicTableRow } from './dynamic-table-row.model'; import { DynamicTableModel } from './dynamic-table.widget.model'; @@ -30,7 +30,17 @@ import { DynamicTableModel } from './dynamic-table.widget.model'; selector: 'dynamic-table-widget', templateUrl: './dynamic-table.widget.html', styleUrls: ['./dynamic-table.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class DynamicTableWidgetComponent extends WidgetComponent implements OnInit { diff --git a/lib/core/form/components/widgets/dynamic-table/editors/dropdown/dropdown.editor.spec.ts b/lib/core/form/components/widgets/dynamic-table/editors/dropdown/dropdown.editor.spec.ts index af082dafde..e25ea1c3bd 100644 --- a/lib/core/form/components/widgets/dynamic-table/editors/dropdown/dropdown.editor.spec.ts +++ b/lib/core/form/components/widgets/dynamic-table/editors/dropdown/dropdown.editor.spec.ts @@ -190,7 +190,7 @@ describe('DropdownEditorComponent', () => { let dynamicTable: DynamicTableModel; function openSelect() { - const dropdown = fixture.debugElement.query(By.css('[class="mat-select-trigger"]')); + const dropdown = fixture.debugElement.query(By.css('.mat-select-trigger')); dropdown.triggerEventHandler('click', null); fixture.detectChanges(); } diff --git a/lib/core/form/components/widgets/error/error.component.ts b/lib/core/form/components/widgets/error/error.component.ts index edd2c59dd3..75043248e0 100644 --- a/lib/core/form/components/widgets/error/error.component.ts +++ b/lib/core/form/components/widgets/error/error.component.ts @@ -21,7 +21,7 @@ import { animate, state, style, transition, trigger } from '@angular/animations' import { Component, Input, OnChanges, SimpleChanges, ViewEncapsulation } from '@angular/core'; import { ErrorMessageModel } from '../core/index'; import { FormService } from './../../../services/form.service'; -import { baseHost , WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; @Component({ selector: 'error-widget', @@ -36,7 +36,17 @@ import { baseHost , WidgetComponent } from './../widget.component'; ]) ]) ], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class ErrorWidgetComponent extends WidgetComponent implements OnChanges { diff --git a/lib/core/form/components/widgets/functional-group/functional-group.widget.ts b/lib/core/form/components/widgets/functional-group/functional-group.widget.ts index 10c15fa8d5..d564038131 100644 --- a/lib/core/form/components/widgets/functional-group/functional-group.widget.ts +++ b/lib/core/form/components/widgets/functional-group/functional-group.widget.ts @@ -21,13 +21,23 @@ import { ENTER, ESCAPE } from '@angular/cdk/keycodes'; import { Component, ElementRef, OnInit, ViewEncapsulation } from '@angular/core'; import { FormService } from '../../../services/form.service'; import { GroupModel } from './../core/group.model'; -import { baseHost , WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; @Component({ selector: 'functional-group-widget', templateUrl: './functional-group.widget.html', styleUrls: ['./functional-group.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class FunctionalGroupWidgetComponent extends WidgetComponent implements OnInit { diff --git a/lib/core/form/components/widgets/hyperlink/hyperlink.widget.ts b/lib/core/form/components/widgets/hyperlink/hyperlink.widget.ts index 6f6c168802..d746feaa43 100644 --- a/lib/core/form/components/widgets/hyperlink/hyperlink.widget.ts +++ b/lib/core/form/components/widgets/hyperlink/hyperlink.widget.ts @@ -19,13 +19,23 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { FormService } from './../../../services/form.service'; -import { baseHost , WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; @Component({ selector: 'hyperlink-widget', templateUrl: './hyperlink.widget.html', styleUrls: ['./hyperlink.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class HyperlinkWidgetComponent extends WidgetComponent implements OnInit { diff --git a/lib/core/form/components/widgets/json/json.widget.ts b/lib/core/form/components/widgets/json/json.widget.ts index 1ab91f518f..6d1f0642cc 100644 --- a/lib/core/form/components/widgets/json/json.widget.ts +++ b/lib/core/form/components/widgets/json/json.widget.ts @@ -17,7 +17,7 @@ import { Component, ViewEncapsulation } from '@angular/core'; import { FormService } from './../../../services/form.service'; -import { baseHost, WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; import { MatDialog } from '@angular/material/dialog'; import { EditJsonDialogSettings, EditJsonDialogComponent } from '../../../../dialogs/edit-json/edit-json.dialog'; @@ -25,7 +25,17 @@ import { EditJsonDialogSettings, EditJsonDialogComponent } from '../../../../dia template: ` `, - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class JsonWidgetComponent extends WidgetComponent { diff --git a/lib/core/form/components/widgets/multiline-text/multiline-text.widget.ts b/lib/core/form/components/widgets/multiline-text/multiline-text.widget.ts index 3456d9277c..309b080bf9 100644 --- a/lib/core/form/components/widgets/multiline-text/multiline-text.widget.ts +++ b/lib/core/form/components/widgets/multiline-text/multiline-text.widget.ts @@ -19,13 +19,23 @@ import { Component, ViewEncapsulation } from '@angular/core'; import { FormService } from './../../../services/form.service'; -import { baseHost , WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; @Component({ selector: 'multiline-text-widget', templateUrl: './multiline-text.widget.html', styleUrls: ['./multiline-text.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class MultilineTextWidgetComponentComponent extends WidgetComponent { diff --git a/lib/core/form/components/widgets/number/number.widget.ts b/lib/core/form/components/widgets/number/number.widget.ts index c6493d6e38..69064aef7e 100644 --- a/lib/core/form/components/widgets/number/number.widget.ts +++ b/lib/core/form/components/widgets/number/number.widget.ts @@ -19,14 +19,24 @@ import { Component, ViewEncapsulation, OnInit } from '@angular/core'; import { FormService } from './../../../services/form.service'; -import { baseHost , WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; import { DecimalNumberPipe } from '../../../../pipes/decimal-number.pipe'; @Component({ selector: 'number-widget', templateUrl: './number.widget.html', styleUrls: ['./number.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class NumberWidgetComponent extends WidgetComponent implements OnInit { diff --git a/lib/core/form/components/widgets/people/people.widget.ts b/lib/core/form/components/widgets/people/people.widget.ts index 6a7f9c9cbe..bcfc1354b5 100644 --- a/lib/core/form/components/widgets/people/people.widget.ts +++ b/lib/core/form/components/widgets/people/people.widget.ts @@ -22,7 +22,7 @@ import { UserProcessModel } from '../../../../models'; import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild, ViewEncapsulation } from '@angular/core'; import { FormService } from '../../../services/form.service'; import { GroupModel } from '../core/group.model'; -import { baseHost, WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; import { FormControl } from '@angular/forms'; import { Observable, of } from 'rxjs'; import { @@ -37,7 +37,17 @@ import { selector: 'people-widget', templateUrl: './people.widget.html', styleUrls: ['./people.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class PeopleWidgetComponent extends WidgetComponent implements OnInit { diff --git a/lib/core/form/components/widgets/radio-buttons/radio-buttons.widget.ts b/lib/core/form/components/widgets/radio-buttons/radio-buttons.widget.ts index 1027a58fe7..cdcb3e43e7 100644 --- a/lib/core/form/components/widgets/radio-buttons/radio-buttons.widget.ts +++ b/lib/core/form/components/widgets/radio-buttons/radio-buttons.widget.ts @@ -21,13 +21,23 @@ import { LogService } from '../../../../services/log.service'; import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { FormService } from '../../../services/form.service'; import { FormFieldOption } from './../core/form-field-option'; -import { baseHost , WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; @Component({ selector: 'radio-buttons-widget', templateUrl: './radio-buttons.widget.html', styleUrls: ['./radio-buttons.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class RadioButtonsWidgetComponent extends WidgetComponent implements OnInit { diff --git a/lib/core/form/components/widgets/text/text.widget.ts b/lib/core/form/components/widgets/text/text.widget.ts index 4de043a069..79c4251662 100644 --- a/lib/core/form/components/widgets/text/text.widget.ts +++ b/lib/core/form/components/widgets/text/text.widget.ts @@ -19,13 +19,23 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { FormService } from './../../../services/form.service'; -import { baseHost , WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; @Component({ selector: 'text-widget', templateUrl: './text.widget.html', styleUrls: ['./text.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class TextWidgetComponent extends WidgetComponent implements OnInit { diff --git a/lib/core/form/components/widgets/typeahead/typeahead.widget.ts b/lib/core/form/components/widgets/typeahead/typeahead.widget.ts index b3c5096b94..38c0dd8e14 100644 --- a/lib/core/form/components/widgets/typeahead/typeahead.widget.ts +++ b/lib/core/form/components/widgets/typeahead/typeahead.widget.ts @@ -22,13 +22,23 @@ import { ENTER, ESCAPE } from '@angular/cdk/keycodes'; import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { FormService } from './../../../services/form.service'; import { FormFieldOption } from './../core/form-field-option'; -import { baseHost, WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; @Component({ selector: 'typeahead-widget', templateUrl: './typeahead.widget.html', styleUrls: ['./typeahead.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class TypeaheadWidgetComponent extends WidgetComponent implements OnInit { diff --git a/lib/core/form/components/widgets/unknown/unknown.widget.ts b/lib/core/form/components/widgets/unknown/unknown.widget.ts index 32ae725ce6..c605984058 100644 --- a/lib/core/form/components/widgets/unknown/unknown.widget.ts +++ b/lib/core/form/components/widgets/unknown/unknown.widget.ts @@ -19,7 +19,7 @@ import { Component, ViewEncapsulation } from '@angular/core'; import { FormService } from './../../../services/form.service'; -import { baseHost , WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; @Component({ selector: 'unknown-widget', @@ -33,7 +33,17 @@ import { baseHost , WidgetComponent } from './../widget.component'; `, styleUrls: ['./unknown.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class UnknownWidgetComponent extends WidgetComponent { diff --git a/lib/core/form/components/widgets/upload-folder/upload-folder.widget.ts b/lib/core/form/components/widgets/upload-folder/upload-folder.widget.ts index de487472b5..37a1ca14fd 100644 --- a/lib/core/form/components/widgets/upload-folder/upload-folder.widget.ts +++ b/lib/core/form/components/widgets/upload-folder/upload-folder.widget.ts @@ -24,14 +24,24 @@ import { Observable, from } from 'rxjs'; import { FormService } from '../../../services/form.service'; import { ProcessContentService } from '../../../services/process-content.service'; import { ContentLinkModel } from '../core/content-link.model'; -import { baseHost, WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; import { mergeMap, map } from 'rxjs/operators'; @Component({ selector: 'upload-folder-widget', templateUrl: './upload-folder.widget.html', styleUrls: ['./upload-folder.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class UploadFolderWidgetComponent extends WidgetComponent implements OnInit { diff --git a/lib/core/form/components/widgets/upload/upload.widget.ts b/lib/core/form/components/widgets/upload/upload.widget.ts index 5f51a58b4e..356a2aced9 100644 --- a/lib/core/form/components/widgets/upload/upload.widget.ts +++ b/lib/core/form/components/widgets/upload/upload.widget.ts @@ -24,14 +24,24 @@ import { Observable, from } from 'rxjs'; import { FormService } from '../../../services/form.service'; import { ProcessContentService } from '../../../services/process-content.service'; import { ContentLinkModel } from '../core/content-link.model'; -import { baseHost, WidgetComponent } from './../widget.component'; +import { WidgetComponent } from './../widget.component'; import { mergeMap, map } from 'rxjs/operators'; @Component({ selector: 'upload-widget', templateUrl: './upload.widget.html', styleUrls: ['./upload.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class UploadWidgetComponent extends WidgetComponent implements OnInit { diff --git a/lib/core/form/components/widgets/widget.component.ts b/lib/core/form/components/widgets/widget.component.ts index fcf0feb3d2..07d75999ef 100644 --- a/lib/core/form/components/widgets/widget.component.ts +++ b/lib/core/form/components/widgets/widget.component.ts @@ -21,25 +21,23 @@ import { AfterViewInit, Component, EventEmitter, Input, Output, ViewEncapsulatio import { FormService } from './../../services/form.service'; import { FormFieldModel } from './core/index'; -export const baseHost = { - '(click)': 'event($event)', - '(blur)': 'event($event)', - '(change)': 'event($event)', - '(focus)': 'event($event)', - '(focusin)': 'event($event)', - '(focusout)': 'event($event)', - '(input)': 'event($event)', - '(invalid)': 'event($event)', - '(select)': 'event($event)' -}; - /** * Base widget component. */ @Component({ selector: 'base-widget', template: '', - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class WidgetComponent implements AfterViewInit { diff --git a/lib/core/form/public-api.ts b/lib/core/form/public-api.ts index c977566a48..77ab016979 100644 --- a/lib/core/form/public-api.ts +++ b/lib/core/form/public-api.ts @@ -15,9 +15,11 @@ * limitations under the License. */ +export * from './components/form-field/form-field.component'; export * from './components/form-base.component'; export * from './components/form-list.component'; export * from './components/widgets/content/content.widget'; +export * from './components/form-custom-button.directive'; export * from './components/form-renderer.component'; export * from './components/widgets/index'; export * from './components/widgets/dynamic-table/dynamic-table-row.model'; diff --git a/lib/core/icon/icon.module.ts b/lib/core/icon/icon.module.ts index 8351ccb241..34093f1c4a 100644 --- a/lib/core/icon/icon.module.ts +++ b/lib/core/icon/icon.module.ts @@ -19,7 +19,6 @@ import { NgModule } from '@angular/core'; import { IconComponent } from './icon.component'; import { MatIconModule } from '@angular/material'; import { CommonModule } from '@angular/common'; -import { ThumbnailService } from '../services/thumbnail.service'; @NgModule({ imports: [ @@ -31,9 +30,6 @@ import { ThumbnailService } from '../services/thumbnail.service'; ], exports: [ IconComponent - ], - providers: [ - ThumbnailService ] }) export class IconModule {} diff --git a/lib/core/index.ts b/lib/core/index.ts index 46c90a5416..a87db9865a 100644 --- a/lib/core/index.ts +++ b/lib/core/index.ts @@ -51,4 +51,5 @@ export * from './events/index'; export * from './mock/index'; export * from './testing'; +export * from './material.module'; export * from './core.module'; diff --git a/lib/core/info-drawer/info-drawer.module.ts b/lib/core/info-drawer/info-drawer.module.ts index 2c493c2de3..45918b3db1 100644 --- a/lib/core/info-drawer/info-drawer.module.ts +++ b/lib/core/info-drawer/info-drawer.module.ts @@ -23,24 +23,27 @@ import { InfoDrawerLayoutComponent, InfoDrawerTitleDirective, InfoDrawerButtonsD import { InfoDrawerComponent, InfoDrawerTabComponent } from './info-drawer.component'; import { TranslateModule } from '@ngx-translate/core'; -export function declarations() { - return [ - InfoDrawerLayoutComponent, - InfoDrawerTabComponent, - InfoDrawerComponent, - InfoDrawerTitleDirective, - InfoDrawerButtonsDirective, - InfoDrawerContentDirective - ]; -} - @NgModule({ imports: [ CommonModule, MaterialModule, TranslateModule.forChild() ], - declarations: declarations(), - exports: declarations() + declarations: [ + InfoDrawerLayoutComponent, + InfoDrawerTabComponent, + InfoDrawerComponent, + InfoDrawerTitleDirective, + InfoDrawerButtonsDirective, + InfoDrawerContentDirective + ], + exports: [ + InfoDrawerLayoutComponent, + InfoDrawerTabComponent, + InfoDrawerComponent, + InfoDrawerTitleDirective, + InfoDrawerButtonsDirective, + InfoDrawerContentDirective + ] }) export class InfoDrawerModule {} diff --git a/lib/core/layout/public-api.ts b/lib/core/layout/public-api.ts index b0582cec71..058869ba9d 100644 --- a/lib/core/layout/public-api.ts +++ b/lib/core/layout/public-api.ts @@ -15,6 +15,13 @@ * limitations under the License. */ +export * from './components/header/header.component'; +export * from './components/layout-container/layout-container.component'; +export * from './components/sidebar-action/sidebar-action-menu.component'; export * from './components/sidenav-layout/sidenav-layout.component'; +export * from './directives/sidenav-layout-content.directive'; +export * from './directives/sidenav-layout-header.directive'; +export * from './directives/sidenav-layout-navigation.directive'; + export * from './layout.module'; diff --git a/lib/core/mock/cookie.service.mock.ts b/lib/core/mock/cookie.service.mock.ts index 28eaf2dd35..ce276c02ac 100644 --- a/lib/core/mock/cookie.service.mock.ts +++ b/lib/core/mock/cookie.service.mock.ts @@ -15,8 +15,10 @@ * limitations under the License. */ +import { Injectable } from '@angular/core'; import { CookieService } from '../services/cookie.service'; +@Injectable() export class CookieServiceMock extends CookieService { /** @override */ diff --git a/lib/core/mock/translation.service.mock.ts b/lib/core/mock/translation.service.mock.ts index d8e02fd9cd..3bd1f31ad7 100644 --- a/lib/core/mock/translation.service.mock.ts +++ b/lib/core/mock/translation.service.mock.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { EventEmitter } from '@angular/core'; +import { EventEmitter, Injectable } from '@angular/core'; import { Observable, of } from 'rxjs'; import { TranslationService } from '../services/translation.service'; @@ -24,6 +24,7 @@ export interface LangChangeEvent { translations: any; } +@Injectable() export class TranslationMock implements TranslationService { defaultLang: string = 'en'; diff --git a/lib/core/ng-package.json b/lib/core/ng-package.json index 8337c7246a..367438ff45 100644 --- a/lib/core/ng-package.json +++ b/lib/core/ng-package.json @@ -1,15 +1,12 @@ { "$schema": "./node_modules/ng-packagr/ng-package.schema.json", - "workingDirectory" : "./ng_work", - "src": "./core/", "dest": "../dist/core/", "lib": { - "languageLevel": [ "dom", "es2016" ], - "comments" : "none", "entryFile": "./public-api.ts", "flatModuleFile": "adf-core", "umdModuleIds": { "@alfresco/js-api": "@alfresco/js-api", + "@alfresco/adf-extensions": "@alfresco/adf-extensions", "minimatch": "minimatch-browser", "@angular/platform-browser/animations": "@angular/platform-browser/animations", "@angular/material": "@angular/material", diff --git a/lib/core/pipes/public-api.ts b/lib/core/pipes/public-api.ts index 3b86da84b0..6a90abf7f5 100644 --- a/lib/core/pipes/public-api.ts +++ b/lib/core/pipes/public-api.ts @@ -15,15 +15,17 @@ * limitations under the License. */ +export * from './decimal-number.pipe'; export * from './file-size.pipe'; +export * from './file-type.pipe'; +export * from './format-space.pipe'; +export * from './full-name.pipe'; +export * from './localized-date.pipe'; export * from './mime-type-icon.pipe'; +export * from './multi-value.pipe'; export * from './node-name-tooltip.pipe'; export * from './text-highlight.pipe'; export * from './time-ago.pipe'; export * from './user-initial.pipe'; -export * from './full-name.pipe'; -export * from './multi-value.pipe'; -export * from './localized-date.pipe'; -export * from './decimal-number.pipe'; export * from './pipe.module'; diff --git a/lib/core/search-text/public-api.ts b/lib/core/search-text/public-api.ts index 12ad5e3cb5..ff1f3a8fd5 100644 --- a/lib/core/search-text/public-api.ts +++ b/lib/core/search-text/public-api.ts @@ -15,5 +15,7 @@ * limitations under the License. */ - export * from './search-text-input.component'; - export * from './search-text-input.module'; +export * from './animations'; +export * from './search-text-input.component'; +export * from './search-trigger.directive'; +export * from './search-text-input.module'; diff --git a/lib/core/search-text/search-text-input.component.spec.ts b/lib/core/search-text/search-text-input.component.spec.ts index 0d46bbe486..5613ab400f 100644 --- a/lib/core/search-text/search-text-input.component.spec.ts +++ b/lib/core/search-text/search-text-input.component.spec.ts @@ -32,8 +32,7 @@ describe('SearchTextInputComponent', () => { let userPreferencesService: UserPreferencesService; setupTestBed({ - imports: [CoreTestingModule], - providers: [ UserPreferencesService ] + imports: [CoreTestingModule] }); beforeEach(() => { diff --git a/lib/core/services/directionality-config.service.spec.ts b/lib/core/services/directionality-config.service.spec.ts index b3b0405573..068257580f 100644 --- a/lib/core/services/directionality-config.service.spec.ts +++ b/lib/core/services/directionality-config.service.spec.ts @@ -16,7 +16,6 @@ */ import { TestBed } from '@angular/core/testing'; -import { DirectionalityConfigService } from './directionality-config.service'; import { CoreTestingModule } from '../testing/core.testing.module'; import { setupTestBed } from '../testing/setup-test-bed'; import { UserPreferencesService } from './user-preferences.service'; @@ -25,11 +24,7 @@ describe('DirectionalityConfigService', () => { let userPreferencesService: UserPreferencesService; setupTestBed({ - imports: [CoreTestingModule], - providers: [ - DirectionalityConfigService, - UserPreferencesService - ] + imports: [CoreTestingModule] }); beforeEach(() => { diff --git a/lib/core/services/translate-loader.service.ts b/lib/core/services/translate-loader.service.ts index 9b7f73eb5a..9c9ac5c1ce 100644 --- a/lib/core/services/translate-loader.service.ts +++ b/lib/core/services/translate-loader.service.ts @@ -17,7 +17,6 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import { Response } from '@angular/http'; import { TranslateLoader } from '@ngx-translate/core'; import { Observable, forkJoin, throwError, of } from 'rxjs'; import { ComponentTranslationModel } from '../models/component.model'; @@ -59,7 +58,7 @@ export class TranslateLoaderService implements TranslateLoader { const translationUrl = fallbackUrl || `${component.path}/${this.prefix}/${lang}${this.suffix}?v=${Date.now()}`; return this.http.get(translationUrl).pipe( - map((res: Response) => { + map((res: any) => { component.json[lang] = res; }), retry(3), diff --git a/lib/core/services/upload.service.ts b/lib/core/services/upload.service.ts index eeb2103c51..68b6767240 100644 --- a/lib/core/services/upload.service.ts +++ b/lib/core/services/upload.service.ts @@ -16,7 +16,7 @@ */ import { EventEmitter, Injectable } from '@angular/core'; -import { Minimatch } from 'minimatch-browser'; +import { Minimatch } from 'minimatch'; import { Subject } from 'rxjs'; import { AppConfigService } from '../app-config/app-config.service'; import { diff --git a/lib/core/tsconfig.lib.json b/lib/core/tsconfig.lib.json index 049b4da4fc..16b2e6ddda 100644 --- a/lib/core/tsconfig.lib.json +++ b/lib/core/tsconfig.lib.json @@ -1,6 +1,7 @@ { "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "../dist/core/" + "outDir": "../dist/core/", + "baseUrl": "." } } diff --git a/lib/core/utils/moment-date-adapter.ts b/lib/core/utils/moment-date-adapter.ts index bd4066265d..3a1dcc859b 100644 --- a/lib/core/utils/moment-date-adapter.ts +++ b/lib/core/utils/moment-date-adapter.ts @@ -15,10 +15,12 @@ * limitations under the License. */ +import { Injectable } from '@angular/core'; import { DateAdapter } from '@angular/material'; import { isMoment, Moment } from 'moment'; import moment from 'moment-es6'; +@Injectable() export class MomentDateAdapter extends DateAdapter { private localeData: any = moment.localeData(); diff --git a/lib/core/viewer/public-api.ts b/lib/core/viewer/public-api.ts index 5e1f6d727a..4377246703 100644 --- a/lib/core/viewer/public-api.ts +++ b/lib/core/viewer/public-api.ts @@ -19,9 +19,11 @@ export * from './services/view-util.service'; export * from './components/viewer.component'; export * from './components/img-viewer.component'; export * from './components/media-player.component'; +export * from './components/pdf-viewer-password-dialog'; export * from './components/pdf-viewer.component'; export * from './components/pdf-viewer-thumbnails.component'; export * from './components/pdf-viewer-thumb.component'; +export * from './components/pdf-viewer-thumbnails.component'; export * from './components/txt-viewer.component'; export * from './components/unknown-format/unknown-format.component'; export * from './components/viewer-more-actions.component'; diff --git a/lib/core/viewer/viewer.module.ts b/lib/core/viewer/viewer.module.ts index c190fd3549..bccc97f6d1 100644 --- a/lib/core/viewer/viewer.module.ts +++ b/lib/core/viewer/viewer.module.ts @@ -46,7 +46,6 @@ import { A11yModule } from '@angular/cdk/a11y'; @NgModule({ imports: [ - ExtensionsModule, CommonModule, MaterialModule, TranslateModule.forChild(), @@ -56,7 +55,8 @@ import { A11yModule } from '@angular/cdk/a11y'; PipeModule, FlexLayoutModule, DirectiveModule, - A11yModule + A11yModule, + ExtensionsModule ], declarations: [ PdfPasswordDialogComponent, diff --git a/lib/extensions/ng-package.json b/lib/extensions/ng-package.json index 5eb0fcd86c..eb8ee8883a 100644 --- a/lib/extensions/ng-package.json +++ b/lib/extensions/ng-package.json @@ -3,7 +3,6 @@ "dest": "../dist/extensions/", "deleteDestPath": false, "lib": { - "languageLevel": ["dom", "es2017"], "entryFile": "src/public-api.ts", "flatModuleFile": "adf-extensions", "umdModuleIds": { diff --git a/lib/extensions/src/public-api.ts b/lib/extensions/src/public-api.ts index 4f248fb5bf..98b8c8c30b 100644 --- a/lib/extensions/src/public-api.ts +++ b/lib/extensions/src/public-api.ts @@ -42,3 +42,4 @@ export * from './lib/store/states/selection.state'; export * from './lib/store/states/repository.state'; export * from './lib/components/public-api'; +export * from './lib/extensions.module'; diff --git a/lib/insights/ng-package.json b/lib/insights/ng-package.json index d6b3df79ff..3fd1a20b8f 100644 --- a/lib/insights/ng-package.json +++ b/lib/insights/ng-package.json @@ -2,7 +2,6 @@ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", "dest": "../dist/insights/", "lib": { - "languageLevel": [ "dom", "es2017" ], "entryFile": "src/public-api.ts", "flatModuleFile": "adf-insights", "umdModuleIds": { diff --git a/lib/insights/src/lib/analytics-process/public-api.ts b/lib/insights/src/lib/analytics-process/public-api.ts index eabc71c8df..f2e2bb2d00 100644 --- a/lib/insights/src/lib/analytics-process/public-api.ts +++ b/lib/insights/src/lib/analytics-process/public-api.ts @@ -16,9 +16,18 @@ */ export * from './components/analytics.component'; +export * from './components/analytics-report-heat-map.component'; export * from './components/analytics-generator.component'; export * from './components/analytics-report-list.component'; export * from './components/analytics-report-parameters.component'; +export * from './components/analytics.component'; + +export * from './components/widgets/checkbox/checkbox.widget'; +export * from './components/widgets/date-range/date-range.widget'; +export * from './components/widgets/dropdown/dropdown.widget'; +export * from './components/widgets/duration/duration.widget'; +export * from './components/widgets/number/number.widget'; +export * from './components/widgets/widget.component'; export * from './services/analytics.service'; diff --git a/lib/insights/src/lib/analytics-process/services/analytics.service.ts b/lib/insights/src/lib/analytics-process/services/analytics.service.ts index 03893bbd53..10d5ac44fe 100644 --- a/lib/insights/src/lib/analytics-process/services/analytics.service.ts +++ b/lib/insights/src/lib/analytics-process/services/analytics.service.ts @@ -17,7 +17,6 @@ import { AlfrescoApiService, LogService } from '@alfresco/adf-core'; import { Injectable } from '@angular/core'; -import { Response } from '@angular/http'; import { Observable, from, throwError, of } from 'rxjs'; import { ParameterValueModel } from '../../diagram/models/report/parameter-value.model'; import { ReportParametersModel } from '../../diagram/models/report/report-parameters.model'; @@ -30,7 +29,7 @@ import { PieChart } from '../../diagram/models/chart/pie-chart.model'; import { TableChart } from '../../diagram/models/chart/table-chart.model'; import { map, catchError } from 'rxjs/operators'; -@Injectable() +@Injectable({ providedIn: 'root' }) export class AnalyticsService { constructor(private apiService: AlfrescoApiService, @@ -256,7 +255,7 @@ export class AnalyticsService { ); } - private handleError(error: Response) { + private handleError(error: any) { this.logService.error(error); return throwError(error || 'Server error'); } diff --git a/lib/insights/src/lib/diagram/components/raphael/raphael.service.ts b/lib/insights/src/lib/diagram/components/raphael/raphael.service.ts index 6c0fb9ab03..cf4e263b69 100644 --- a/lib/insights/src/lib/diagram/components/raphael/raphael.service.ts +++ b/lib/insights/src/lib/diagram/components/raphael/raphael.service.ts @@ -19,7 +19,7 @@ import { Injectable , OnDestroy } from '@angular/core'; declare let Raphael: any; -@Injectable() +@Injectable({ providedIn: 'root' }) export class RaphaelService implements OnDestroy { paper: any; diff --git a/lib/insights/src/lib/diagram/public-api.ts b/lib/insights/src/lib/diagram/public-api.ts index 6b320c9f7c..a023373c2a 100644 --- a/lib/insights/src/lib/diagram/public-api.ts +++ b/lib/insights/src/lib/diagram/public-api.ts @@ -18,6 +18,95 @@ export * from './components/diagram-sequence-flow.component'; export * from './components/diagram.component'; +export * from './components/activities/diagram-alfresco-publish-task.component'; +export * from './components/activities/diagram-box-publish-task.component'; +export * from './components/activities/diagram-business-rule-task.component'; +export * from './components/activities/diagram-camel-task.component'; +export * from './components/activities/diagram-container-service-task.component'; +export * from './components/activities/diagram-google-drive-publish-task.component'; +export * from './components/activities/diagram-manual-task.component'; +export * from './components/activities/diagram-mule-task.component'; +export * from './components/activities/diagram-receive-task.component'; +export * from './components/activities/diagram-rest-call-task.component'; +export * from './components/activities/diagram-script-task.component'; +export * from './components/activities/diagram-send-task.component'; +export * from './components/activities/diagram-service-task.component'; +export * from './components/activities/diagram-task.component'; +export * from './components/activities/diagram-user-task.component'; + +export * from './components/boundary-events/diagram-boundary-event.component'; +export * from './components/boundary-events/diagram-throw-event.component'; +export * from './components/events/diagram-end-event.component'; +export * from './components/events/diagram-event.component'; +export * from './components/events/diagram-start-event.component'; +export * from './components/gateways/diagram-event-gateway.component'; +export * from './components/gateways/diagram-exclusive-gateway.component'; +export * from './components/gateways/diagram-gateway.component'; +export * from './components/gateways/diagram-inclusive-gateway.component'; +export * from './components/gateways/diagram-parallel-gateway.component'; + +export * from './components/icons/diagram-container-icon-event.component'; +export * from './components/icons/diagram-icon-alfresco-publish-task.component'; +export * from './components/icons/diagram-icon-box-publish-task.component'; +export * from './components/icons/diagram-icon-business-rule-task.component'; +export * from './components/icons/diagram-icon-camel-task.component'; +export * from './components/icons/diagram-icon-error.component'; +export * from './components/icons/diagram-icon-google-drive-publish-task.component'; +export * from './components/icons/diagram-icon-manual-task.component'; +export * from './components/icons/diagram-icon-message.component'; +export * from './components/icons/diagram-icon-mule-task.component'; +export * from './components/icons/diagram-icon-receive-task.component'; +export * from './components/icons/diagram-icon-rest-call-task.component'; +export * from './components/icons/diagram-icon-script-task.component'; +export * from './components/icons/diagram-icon-send-task.component'; +export * from './components/icons/diagram-icon-service-task.component'; +export * from './components/icons/diagram-icon-signal.component'; +export * from './components/icons/diagram-icon-timer.component'; +export * from './components/icons/diagram-icon-user-task.component'; + +export * from './components/intermediate-catching-events/diagram-intermediate-catching-event.component'; + +export * from './components/raphael/icons/raphael-icon-alfresco-publish.component'; +export * from './components/raphael/icons/raphael-icon-box-publish.component'; +export * from './components/raphael/icons/raphael-icon-business-rule.component'; +export * from './components/raphael/icons/raphael-icon-camel.component'; +export * from './components/raphael/icons/raphael-icon-error.component'; +export * from './components/raphael/icons/raphael-icon-google-drive-publish.component'; +export * from './components/raphael/icons/raphael-icon-manual.component'; +export * from './components/raphael/icons/raphael-icon-message.component'; +export * from './components/raphael/icons/raphael-icon-mule.component'; +export * from './components/raphael/icons/raphael-icon-receive.component'; +export * from './components/raphael/icons/raphael-icon-rest-call.component'; +export * from './components/raphael/icons/raphael-icon-script.component'; +export * from './components/raphael/icons/raphael-icon-send.component'; +export * from './components/raphael/icons/raphael-icon-service.component'; +export * from './components/raphael/icons/raphael-icon-signal.component'; +export * from './components/raphael/icons/raphael-icon-timer.component'; +export * from './components/raphael/icons/raphael-icon-user.component'; + +export * from './components/raphael/anchor'; +export * from './components/raphael/polyline'; +export * from './components/raphael/raphael-base'; +export * from './components/raphael/raphael-circle.component'; +export * from './components/raphael/raphael-cross.component'; +export * from './components/raphael/raphael-flow-arrow.component'; +export * from './components/raphael/raphael-multiline-text.component'; +export * from './components/raphael/raphael-pentagon.component'; +export * from './components/raphael/raphael-plus.component'; +export * from './components/raphael/raphael-rect.component'; +export * from './components/raphael/raphael-rhombus.component'; +export * from './components/raphael/raphael-text.component'; +export * from './components/raphael/models/point'; +export * from './components/raphael/raphael.service'; + +export * from './components/structural/diagram-event-subprocess.component'; +export * from './components/structural/diagram-subprocess.component'; +export * from './components/swimlanes/diagram-lane.component'; +export * from './components/swimlanes/diagram-lanes.component'; +export * from './components/swimlanes/diagram-pool.component'; +export * from './components/swimlanes/diagram-pools.component'; +export * from './components/tooltip/diagram-tooltip.component'; + export * from './services/diagram-color.service'; export * from './services/diagrams.service'; diff --git a/lib/insights/src/lib/diagram/services/diagram-color.service.ts b/lib/insights/src/lib/diagram/services/diagram-color.service.ts index ea25f4171c..0fbbd54527 100644 --- a/lib/insights/src/lib/diagram/services/diagram-color.service.ts +++ b/lib/insights/src/lib/diagram/services/diagram-color.service.ts @@ -17,7 +17,7 @@ import { Injectable } from '@angular/core'; -@Injectable() +@Injectable({ providedIn: 'root' }) export class DiagramColorService { static CURRENT_COLOR = '#017501'; @@ -33,9 +33,6 @@ export class DiagramColorService { totalColors: any; - constructor() { - } - setTotalColors(totalColors) { this.totalColors = totalColors; } diff --git a/lib/insights/src/lib/diagram/services/diagrams.service.ts b/lib/insights/src/lib/diagram/services/diagrams.service.ts index 5efb50d608..81d9f208d8 100644 --- a/lib/insights/src/lib/diagram/services/diagrams.service.ts +++ b/lib/insights/src/lib/diagram/services/diagrams.service.ts @@ -20,7 +20,7 @@ import { Injectable } from '@angular/core'; import { Observable, from, throwError } from 'rxjs'; import { catchError } from 'rxjs/operators'; -@Injectable() +@Injectable({ providedIn: 'root' }) export class DiagramsService { constructor(private apiService: AlfrescoApiService, diff --git a/lib/insights/src/lib/insights.module.ts b/lib/insights/src/lib/insights.module.ts index f80f4b7fc8..ce519b785e 100644 --- a/lib/insights/src/lib/insights.module.ts +++ b/lib/insights/src/lib/insights.module.ts @@ -24,19 +24,6 @@ import { DiagramsModule } from './diagram/diagram.module'; import { AnalyticsProcessModule } from './analytics-process/analytics-process.module'; import { MaterialModule } from './material.module'; -import { DiagramsService } from './diagram/services/diagrams.service'; -import { DiagramColorService } from './diagram/services/diagram-color.service'; -import { RaphaelService } from './diagram/components/raphael/raphael.service'; -import { AnalyticsService } from './analytics-process/services/analytics.service'; - -export function providers() { - return [ - AnalyticsService, - DiagramsService, - DiagramColorService, - RaphaelService - ]; -} @NgModule({ imports: [ @@ -49,7 +36,6 @@ export function providers() { AnalyticsProcessModule ], providers: [ - ...providers(), { provide: TRANSLATION_PROVIDER, multi: true, @@ -73,7 +59,6 @@ export class InsightsModule { return { ngModule: InsightsModule, providers: [ - ...providers(), { provide: TRANSLATION_PROVIDER, multi: true, diff --git a/lib/insights/src/public-api.ts b/lib/insights/src/public-api.ts index 81a3b18d25..1e755fbb7e 100644 --- a/lib/insights/src/public-api.ts +++ b/lib/insights/src/public-api.ts @@ -18,4 +18,5 @@ export * from './lib/analytics-process/public-api'; export * from './lib/diagram/public-api'; +export * from './lib/material.module'; export * from './lib/insights.module'; diff --git a/lib/process-services-cloud/ng-package.json b/lib/process-services-cloud/ng-package.json index 77b6dc0b48..c0ca9d67d3 100644 --- a/lib/process-services-cloud/ng-package.json +++ b/lib/process-services-cloud/ng-package.json @@ -2,7 +2,6 @@ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", "dest": "../dist/process-services-cloud", "lib": { - "languageLevel": ["dom", "es2017"], "entryFile": "src/public-api.ts", "flatModuleFile": "adf-process-services-cloud", "umdModuleIds": { diff --git a/lib/process-services-cloud/src/lib/app/app-list-cloud.module.ts b/lib/process-services-cloud/src/lib/app/app-list-cloud.module.ts index 24c26c6a6f..770f7b9b77 100644 --- a/lib/process-services-cloud/src/lib/app/app-list-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/app/app-list-cloud.module.ts @@ -21,7 +21,6 @@ import { MaterialModule } from '../material.module'; import { CommonModule } from '@angular/common'; import { AppDetailsCloudComponent } from './components/app-details-cloud.component'; import { AppListCloudComponent } from './components/app-list-cloud.component'; -import { AppsProcessCloudService } from './services/apps-process-cloud.service'; import { TemplateModule, CoreModule } from '@alfresco/adf-core'; @NgModule({ @@ -36,9 +35,6 @@ import { TemplateModule, CoreModule } from '@alfresco/adf-core'; AppListCloudComponent, AppDetailsCloudComponent ], - providers: [ - AppsProcessCloudService - ], exports: [ AppListCloudComponent, AppDetailsCloudComponent diff --git a/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.spec.ts index e93ea5ff57..a0bd964073 100644 --- a/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.spec.ts @@ -43,7 +43,6 @@ describe('AppListCloudComponent', () => { setupTestBed({ imports: [CoreModule.forRoot(), ProcessServiceCloudTestingModule, AppListCloudModule], providers: [ - AppsProcessCloudService, { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock } ] }); diff --git a/lib/process-services-cloud/src/lib/app/public-api.ts b/lib/process-services-cloud/src/lib/app/public-api.ts index 9c2b16d9a0..c209dd6807 100644 --- a/lib/process-services-cloud/src/lib/app/public-api.ts +++ b/lib/process-services-cloud/src/lib/app/public-api.ts @@ -16,6 +16,7 @@ */ export * from './components/app-list-cloud.component'; +export * from './components/app-details-cloud.component'; export * from './services/apps-process-cloud.service'; export * from './models/application-instance.model'; export * from './app-list-cloud.module'; diff --git a/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.spec.ts index ef0f82c6ed..9bcb04d060 100644 --- a/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.spec.ts @@ -38,7 +38,7 @@ describe('AppsProcessCloudService', () => { setupTestBed({ imports: [CoreModule.forRoot(), ProcessServiceCloudTestingModule], - providers: [AppsProcessCloudService, AppConfigService, + providers: [ { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock } ] }); diff --git a/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.ts b/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.ts index 146d634855..7429816856 100644 --- a/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.ts +++ b/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.ts @@ -22,7 +22,7 @@ import { AlfrescoApiService, AppConfigService, LogService } from '@alfresco/adf- import { Oauth2Auth } from '@alfresco/js-api'; import { ApplicationInstanceModel } from '../models/application-instance.model'; -@Injectable() +@Injectable({ providedIn: 'root' }) export class AppsProcessCloudService { deployedApps: ApplicationInstanceModel[]; diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.spec.ts b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.spec.ts index 2e28c9c1ba..1229e9fc4b 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.spec.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.spec.ts @@ -113,7 +113,6 @@ describe('AttachFileCloudWidgetComponent', () => { FormCloudModule, ContentModule.forRoot() ], - providers: [], schemas: [CUSTOM_ELEMENTS_SCHEMA] }); diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.ts b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.ts index 6c77845663..bca51377ff 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.ts @@ -23,7 +23,6 @@ import { LogService, ThumbnailService, NotificationService, - baseHost, ContentLinkModel } from '@alfresco/adf-core'; import { Node, RelatedContentRepresentation } from '@alfresco/js-api'; @@ -35,7 +34,17 @@ import { UploadCloudWidgetComponent } from './upload-cloud.widget'; selector: 'adf-cloud-attach-file-cloud-widget', templateUrl: './attach-file-cloud-widget.component.html', styleUrls: ['./attach-file-cloud-widget.component.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class AttachFileCloudWidgetComponent extends UploadCloudWidgetComponent diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/upload-cloud.widget.ts b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/upload-cloud.widget.ts index 17fbddac11..d14474fcac 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/upload-cloud.widget.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/upload-cloud.widget.ts @@ -21,14 +21,24 @@ import { Component, ElementRef, OnInit, ViewChild, ViewEncapsulation } from '@an import { Node } from '@alfresco/js-api'; import { Observable, from } from 'rxjs'; import { mergeMap } from 'rxjs/operators'; -import { WidgetComponent, baseHost, LogService, FormService, ThumbnailService, ContentLinkModel, NotificationService } from '@alfresco/adf-core'; +import { WidgetComponent, LogService, FormService, ThumbnailService, ContentLinkModel, NotificationService } from '@alfresco/adf-core'; import { ProcessCloudContentService } from '../../../services/process-cloud-content.service'; @Component({ selector: 'upload-cloud-widget', templateUrl: './upload-cloud.widget.html', styleUrls: ['./upload-cloud.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class UploadCloudWidgetComponent extends WidgetComponent implements OnInit { diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/date/date-cloud.widget.spec.ts b/lib/process-services-cloud/src/lib/form/components/widgets/date/date-cloud.widget.spec.ts index 23a606caa2..f909f9d5cd 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/date/date-cloud.widget.spec.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/date/date-cloud.widget.spec.ts @@ -19,7 +19,6 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { DateCloudWidgetComponent } from './date-cloud.widget'; import { setupTestBed, FormFieldModel, FormModel, CoreModule } from '@alfresco/adf-core'; -import { FormCloudService } from '../../../services/form-cloud.service'; import moment from 'moment-es6'; describe('DateWidgetComponent', () => { @@ -33,8 +32,7 @@ describe('DateWidgetComponent', () => { NoopAnimationsModule, CoreModule.forRoot() ], - declarations: [DateCloudWidgetComponent], - providers: [FormCloudService] + declarations: [DateCloudWidgetComponent] }); beforeEach(async(() => { diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/date/date-cloud.widget.ts b/lib/process-services-cloud/src/lib/form/components/widgets/date/date-cloud.widget.ts index caaeaf45ea..03e9c71ac3 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/date/date-cloud.widget.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/date/date-cloud.widget.ts @@ -23,7 +23,7 @@ import moment from 'moment-es6'; import { Moment } from 'moment'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; -import { MOMENT_DATE_FORMATS, MomentDateAdapter, baseHost, WidgetComponent, +import { MOMENT_DATE_FORMATS, MomentDateAdapter, WidgetComponent, UserPreferencesService, UserPreferenceValues, FormService } from '@alfresco/adf-core'; @Component({ @@ -33,7 +33,17 @@ import { MOMENT_DATE_FORMATS, MomentDateAdapter, baseHost, WidgetComponent, { provide: MAT_DATE_FORMATS, useValue: MOMENT_DATE_FORMATS }], templateUrl: './date-cloud.widget.html', styleUrls: ['./date-cloud.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class DateCloudWidgetComponent extends WidgetComponent implements OnInit, OnDestroy { diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.spec.ts b/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.spec.ts index 3ae58017ea..7653f09e62 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.spec.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.spec.ts @@ -48,8 +48,7 @@ describe('DropdownCloudWidgetComponent', () => { NoopAnimationsModule, CoreModule.forRoot() ], - declarations: [DropdownCloudWidgetComponent], - providers: [FormCloudService] + declarations: [DropdownCloudWidgetComponent] }); beforeEach(async(() => { diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.ts b/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.ts index 9d2cf0a51e..be6a0ea132 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/dropdown/dropdown-cloud.widget.ts @@ -16,7 +16,7 @@ */ import { Component, OnInit, ViewEncapsulation, OnDestroy } from '@angular/core'; -import { baseHost, WidgetComponent, FormService, LogService, FormFieldOption } from '@alfresco/adf-core'; +import { WidgetComponent, FormService, LogService, FormFieldOption } from '@alfresco/adf-core'; import { FormCloudService } from '../../../services/form-cloud.service'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; @@ -27,7 +27,17 @@ import { takeUntil } from 'rxjs/operators'; selector: 'dropdown-cloud-widget', templateUrl: './dropdown-cloud.widget.html', styleUrls: ['./dropdown-cloud.widget.scss'], - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class DropdownCloudWidgetComponent extends WidgetComponent implements OnInit, OnDestroy { diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/group/group-cloud.widget.ts b/lib/process-services-cloud/src/lib/form/components/widgets/group/group-cloud.widget.ts index 8e9e34dc4e..ed02f981d4 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/group/group-cloud.widget.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/group/group-cloud.widget.ts @@ -16,7 +16,7 @@ */ import { Component, OnInit, ViewEncapsulation } from '@angular/core'; -import { baseHost, WidgetComponent, IdentityGroupModel } from '@alfresco/adf-core'; +import { WidgetComponent, IdentityGroupModel, FormService } from '@alfresco/adf-core'; import { FormControl } from '@angular/forms'; import { filter, takeUntil } from 'rxjs/operators'; import { Subject } from 'rxjs'; @@ -26,7 +26,17 @@ import { Subject } from 'rxjs'; @Component({ selector: 'group-cloud-widget', templateUrl: './group-cloud.widget.html', - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class GroupCloudWidgetComponent extends WidgetComponent implements OnInit { @@ -40,6 +50,10 @@ export class GroupCloudWidgetComponent extends WidgetComponent implements OnInit preSelectGroup: IdentityGroupModel[]; search: FormControl; + constructor(formService: FormService) { + super(formService); + } + ngOnInit() { if (this.field) { this.roles = this.field.roles; diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/people/people-cloud.widget.ts b/lib/process-services-cloud/src/lib/form/components/widgets/people/people-cloud.widget.ts index b01d6b497b..1486bfcac6 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/people/people-cloud.widget.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/people/people-cloud.widget.ts @@ -16,7 +16,7 @@ */ import { Component, OnInit, ViewEncapsulation } from '@angular/core'; -import { baseHost, WidgetComponent, IdentityUserModel } from '@alfresco/adf-core'; +import { WidgetComponent, IdentityUserModel, FormService } from '@alfresco/adf-core'; import { FormControl } from '@angular/forms'; import { filter, takeUntil } from 'rxjs/operators'; import { Subject } from 'rxjs'; @@ -26,7 +26,17 @@ import { Subject } from 'rxjs'; @Component({ selector: 'people-cloud-widget', templateUrl: './people-cloud.widget.html', - host: baseHost, + host: { + '(click)': 'event($event)', + '(blur)': 'event($event)', + '(change)': 'event($event)', + '(focus)': 'event($event)', + '(focusin)': 'event($event)', + '(focusout)': 'event($event)', + '(input)': 'event($event)', + '(invalid)': 'event($event)', + '(select)': 'event($event)' + }, encapsulation: ViewEncapsulation.None }) export class PeopleCloudWidgetComponent extends WidgetComponent implements OnInit { @@ -41,6 +51,10 @@ export class PeopleCloudWidgetComponent extends WidgetComponent implements OnIni preSelectUsers: IdentityUserModel[]; search: FormControl; + constructor(formService: FormService) { + super(formService); + } + ngOnInit() { if (this.field) { this.roles = this.field.roles; diff --git a/lib/process-services-cloud/src/lib/form/form-cloud.module.ts b/lib/process-services-cloud/src/lib/form/form-cloud.module.ts index 806be708a2..b64470ad62 100644 --- a/lib/process-services-cloud/src/lib/form/form-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/form/form-cloud.module.ts @@ -18,12 +18,11 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FlexLayoutModule } from '@angular/flex-layout'; -import { TemplateModule, FormBaseModule, PipeModule, CoreModule } from '@alfresco/adf-core'; +import { CoreModule } from '@alfresco/adf-core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { MaterialModule } from '../material.module'; import { FormCloudComponent } from './components/form-cloud.component'; import { FormDefinitionSelectorCloudComponent } from './components/form-definition-selector-cloud.component'; -import { FormDefinitionSelectorCloudService } from './services/form-definition-selector-cloud.service'; import { FormCustomOutcomesComponent } from './components/form-cloud-custom-outcomes.component'; import { ContentNodeSelectorModule } from '@alfresco/adf-content-services'; @@ -40,13 +39,10 @@ import { GroupCloudModule } from '../group/group-cloud.module'; @NgModule({ imports: [ CommonModule, - PipeModule, - TemplateModule, FlexLayoutModule, MaterialModule, FormsModule, ReactiveFormsModule, - FormBaseModule, CoreModule, ContentNodeSelectorModule, PeopleCloudModule, @@ -63,9 +59,6 @@ import { GroupCloudModule } from '../group/group-cloud.module'; PeopleCloudWidgetComponent, GroupCloudWidgetComponent ], - providers: [ - FormDefinitionSelectorCloudService - ], entryComponents: [ UploadCloudWidgetComponent, DropdownCloudWidgetComponent, @@ -79,7 +72,11 @@ import { GroupCloudModule } from '../group/group-cloud.module'; UploadCloudWidgetComponent, FormDefinitionSelectorCloudComponent, FormCustomOutcomesComponent, - AttachFileCloudWidgetComponent + DropdownCloudWidgetComponent, + AttachFileCloudWidgetComponent, + DateCloudWidgetComponent, + PeopleCloudWidgetComponent, + GroupCloudWidgetComponent ] }) export class FormCloudModule { diff --git a/lib/process-services-cloud/src/lib/form/public-api.ts b/lib/process-services-cloud/src/lib/form/public-api.ts index 91a0d6e619..c9f356573f 100644 --- a/lib/process-services-cloud/src/lib/form/public-api.ts +++ b/lib/process-services-cloud/src/lib/form/public-api.ts @@ -17,10 +17,22 @@ export * from './models/task-variable-cloud.model'; +export * from './components/form-cloud-custom-outcomes.component'; export * from './components/form-cloud.component'; export * from './components/form-definition-selector-cloud.component'; export * from './components/cloud-form-rendering.service'; +export * from './components/widgets/attach-file/attach-file-cloud-widget.component'; +export * from './components/widgets/attach-file/upload-cloud.widget'; +export * from './components/widgets/date/date-cloud.widget'; +export * from './components/widgets/dropdown/dropdown-cloud.widget'; +export * from './components/widgets/group/group-cloud.widget'; +export * from './components/widgets/people/people-cloud.widget'; + +export * from './services/content-cloud-node-selector.service'; export * from './services/form-cloud.service'; export * from './services/form-definition-selector-cloud.service'; export * from './services/content-cloud-node-selector.service'; +export * from './services/process-cloud-content.service'; + +export * from './form-cloud.module'; diff --git a/lib/process-services-cloud/src/lib/form/services/form-definition-selector-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/form/services/form-definition-selector-cloud.service.spec.ts index 5d25cc7ebc..a14ae49e2f 100644 --- a/lib/process-services-cloud/src/lib/form/services/form-definition-selector-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/form/services/form-definition-selector-cloud.service.spec.ts @@ -17,7 +17,7 @@ import { TestBed } from '@angular/core/testing'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; -import { AlfrescoApiService, CoreModule, setupTestBed, AppConfigService } from '@alfresco/adf-core'; +import { AlfrescoApiService, CoreModule, setupTestBed } from '@alfresco/adf-core'; import { FormDefinitionSelectorCloudService } from './form-definition-selector-cloud.service'; declare let jasmine: any; @@ -63,11 +63,6 @@ describe('Form Definition Selector Cloud Service', () => { imports: [ NoopAnimationsModule, CoreModule.forRoot() - ], - providers: [ - FormDefinitionSelectorCloudService, - AlfrescoApiService, - AppConfigService ] }); diff --git a/lib/process-services-cloud/src/lib/group/group-cloud.module.ts b/lib/process-services-cloud/src/lib/group/group-cloud.module.ts index 7148bce5fd..29b1da9c73 100644 --- a/lib/process-services-cloud/src/lib/group/group-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/group/group-cloud.module.ts @@ -20,7 +20,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { CommonModule } from '@angular/common'; import { FlexLayoutModule } from '@angular/flex-layout'; -import { TemplateModule, PipeModule, CoreModule } from '@alfresco/adf-core'; +import { CoreModule } from '@alfresco/adf-core'; import { MaterialModule } from '../material.module'; import { GroupCloudComponent } from './components/group-cloud.component'; import { InitialGroupNamePipe } from './pipe/group-initial.pipe'; @@ -28,8 +28,6 @@ import { InitialGroupNamePipe } from './pipe/group-initial.pipe'; @NgModule({ imports: [ CommonModule, - PipeModule, - TemplateModule, FlexLayoutModule, MaterialModule, FormsModule, diff --git a/lib/process-services-cloud/src/lib/group/pipe/group-initial.pipe.ts b/lib/process-services-cloud/src/lib/group/pipe/group-initial.pipe.ts index f3078683ba..037a85ef46 100644 --- a/lib/process-services-cloud/src/lib/group/pipe/group-initial.pipe.ts +++ b/lib/process-services-cloud/src/lib/group/pipe/group-initial.pipe.ts @@ -23,8 +23,6 @@ import { IdentityGroupModel } from '@alfresco/adf-core'; }) export class InitialGroupNamePipe implements PipeTransform { - constructor() {} - transform(group: IdentityGroupModel): string { let result = ''; if (group) { diff --git a/lib/process-services-cloud/src/lib/group/public-api.ts b/lib/process-services-cloud/src/lib/group/public-api.ts index 94cbce1bc1..a66b680b26 100644 --- a/lib/process-services-cloud/src/lib/group/public-api.ts +++ b/lib/process-services-cloud/src/lib/group/public-api.ts @@ -16,4 +16,5 @@ */ export * from './components/group-cloud.component'; +export * from './pipe/group-initial.pipe'; export * from './group-cloud.module'; diff --git a/lib/process-services-cloud/src/lib/people/people-cloud.module.ts b/lib/process-services-cloud/src/lib/people/people-cloud.module.ts index f1a69cd92f..35fd8b859f 100644 --- a/lib/process-services-cloud/src/lib/people/people-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/people/people-cloud.module.ts @@ -19,15 +19,13 @@ import { NgModule } from '@angular/core'; import { PeopleCloudComponent } from './components/people-cloud.component'; import { CommonModule } from '@angular/common'; import { MaterialModule } from '../material.module'; -import { TemplateModule, CoreModule, PipeModule } from '@alfresco/adf-core'; +import { CoreModule } from '@alfresco/adf-core'; import { FlexLayoutModule } from '@angular/flex-layout'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; @NgModule({ imports: [ CommonModule, - PipeModule, - TemplateModule, FlexLayoutModule, MaterialModule, FormsModule, diff --git a/lib/process-services-cloud/src/lib/process-services-cloud.module.ts b/lib/process-services-cloud/src/lib/process-services-cloud.module.ts index 572cee6444..f96e9d11f7 100644 --- a/lib/process-services-cloud/src/lib/process-services-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/process-services-cloud.module.ts @@ -23,7 +23,6 @@ import { ProcessCloudModule } from './process/process-cloud.module'; import { GroupCloudModule } from './group/group-cloud.module'; import { FormCloudModule } from './form/form-cloud.module'; import { TaskFormModule } from './task/task-form/task-form.module'; -import { UserPreferenceCloudService } from './services/user-preference-cloud.service'; import { LocalPreferenceCloudService, PROCESS_FILTERS_SERVICE_TOKEN, @@ -52,8 +51,6 @@ import { CloudFormRenderingService } from './form/components/cloud-form-renderin source: 'assets/adf-process-services-cloud' } }, - UserPreferenceCloudService, - LocalPreferenceCloudService, { provide: PROCESS_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }, { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }, FormRenderingService, diff --git a/lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.spec.ts index 7ca3012c40..5fd1e06a0d 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.spec.ts @@ -79,7 +79,6 @@ describe('ProcessFiltersCloudComponent', () => { setupTestBed({ imports: [ProcessServiceCloudTestingModule, ProcessFiltersCloudModule], providers: [ - ProcessFilterCloudService, { provide: PROCESS_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService } ] }); diff --git a/lib/process-services-cloud/src/lib/process/process-filters/process-filters-cloud.module.ts b/lib/process-services-cloud/src/lib/process/process-filters/process-filters-cloud.module.ts index 4dc567b18e..3aca27b7bc 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/process-filters-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/process-filters-cloud.module.ts @@ -21,7 +21,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FlexLayoutModule } from '@angular/flex-layout'; import { ProcessFiltersCloudComponent } from './components/process-filters-cloud.component'; import { MaterialModule } from '../../material.module'; -import { LogService, StorageService, CoreModule, MomentDateAdapter, MOMENT_DATE_FORMATS } from '@alfresco/adf-core'; +import { CoreModule, MomentDateAdapter, MOMENT_DATE_FORMATS } from '@alfresco/adf-core'; import { HttpClientModule } from '@angular/common/http'; import { EditProcessFilterCloudComponent } from './components/edit-process-filter-cloud.component'; import { ProcessFilterDialogCloudComponent } from './components/process-filter-dialog-cloud.component'; @@ -44,8 +44,6 @@ import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material'; exports: [ProcessFiltersCloudComponent, EditProcessFilterCloudComponent, ProcessFilterDialogCloudComponent], entryComponents: [ProcessFilterDialogCloudComponent], providers: [ - LogService, - StorageService, { provide: DateAdapter, useClass: MomentDateAdapter }, { provide: MAT_DATE_FORMATS, useValue: MOMENT_DATE_FORMATS } ] diff --git a/lib/process-services-cloud/src/lib/process/process-filters/public-api.ts b/lib/process-services-cloud/src/lib/process/process-filters/public-api.ts index 75cf6b6502..e39747dcdf 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/public-api.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/public-api.ts @@ -17,6 +17,7 @@ export * from './components/process-filters-cloud.component'; export * from './components/edit-process-filter-cloud.component'; +export * from './components/process-filter-dialog-cloud.component'; export * from './models/process-filter-cloud.model'; export * from './services/process-filter-cloud.service'; export * from './process-filters-cloud.module'; diff --git a/lib/process-services-cloud/src/lib/process/process-filters/services/process-filter-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/process/process-filters/services/process-filter-cloud.service.spec.ts index 8112d10123..3df6cef3d9 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/services/process-filter-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/services/process-filter-cloud.service.spec.ts @@ -44,9 +44,6 @@ describe('ProcessFilterCloudService', () => { CoreModule.forRoot() ], providers: [ - ProcessFilterCloudService, - IdentityUserService, - LocalPreferenceCloudService, { provide: PROCESS_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService } ] }); diff --git a/lib/process-services-cloud/src/lib/process/process-header/process-header-cloud.module.ts b/lib/process-services-cloud/src/lib/process/process-header/process-header-cloud.module.ts index 8b7f165d4a..e6597499a7 100644 --- a/lib/process-services-cloud/src/lib/process/process-header/process-header-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/process/process-header/process-header-cloud.module.ts @@ -18,15 +18,13 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { MaterialModule } from '../../material.module'; -import { DataTableModule, TemplateModule, CoreModule } from '@alfresco/adf-core'; +import { CoreModule } from '@alfresco/adf-core'; import { ProcessHeaderCloudComponent } from './components/process-header-cloud.component'; @NgModule({ imports: [ CommonModule, MaterialModule, - DataTableModule, - TemplateModule, CoreModule ], diff --git a/lib/process-services-cloud/src/lib/process/process-list/process-list-cloud.module.ts b/lib/process-services-cloud/src/lib/process/process-list/process-list-cloud.module.ts index 244985b2fc..ec889fa41d 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/process-list-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/process-list-cloud.module.ts @@ -19,20 +19,16 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { ProcessListCloudComponent } from './components/process-list-cloud.component'; import { MaterialModule } from '../../material.module'; -import { DataTableModule, TemplateModule, CoreModule } from '@alfresco/adf-core'; -import { ProcessListCloudService } from './services/process-list-cloud.service'; +import { CoreModule } from '@alfresco/adf-core'; @NgModule({ imports: [ CommonModule, MaterialModule, - DataTableModule, - TemplateModule, CoreModule ], declarations: [ProcessListCloudComponent], - exports: [ProcessListCloudComponent], - providers: [ProcessListCloudService] + exports: [ProcessListCloudComponent] }) export class ProcessListCloudModule { } diff --git a/lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.ts b/lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.ts index 396f1631c9..b35832b8f6 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.ts @@ -21,7 +21,7 @@ import { Observable, throwError } from 'rxjs'; import { ProcessListCloudSortingModel } from '../models/process-list-sorting.model'; import { BaseCloudService } from '../../../services/base-cloud.service'; -@Injectable() +@Injectable({ providedIn: 'root' }) export class ProcessListCloudService extends BaseCloudService { constructor(apiService: AlfrescoApiService, diff --git a/lib/process-services-cloud/src/lib/process/process-list/testing/process-list.testing.module.ts b/lib/process-services-cloud/src/lib/process/process-list/testing/process-list.testing.module.ts index 9ca573e7b1..2970c1fd0f 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/testing/process-list.testing.module.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/testing/process-list.testing.module.ts @@ -23,11 +23,8 @@ import { AlfrescoApiServiceMock, AppConfigService, AppConfigServiceMock, - StorageService, - LogService, TranslationService, TranslationMock, - UserPreferencesService, ContextMenuModule, CoreModule } from '@alfresco/adf-core'; @@ -42,10 +39,7 @@ import { providers: [ { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }, { provide: AppConfigService, useClass: AppConfigServiceMock }, - { provide: TranslationService, useClass: TranslationMock }, - StorageService, - LogService, - UserPreferencesService + { provide: TranslationService, useClass: TranslationMock } ] }) export class ProcessListCloudTestingModule { } diff --git a/lib/process-services-cloud/src/lib/process/start-process/services/start-process-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/process/start-process/services/start-process-cloud.service.spec.ts index 49661de320..37661b896f 100755 --- a/lib/process-services-cloud/src/lib/process/start-process/services/start-process-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/process/start-process/services/start-process-cloud.service.spec.ts @@ -17,13 +17,7 @@ import { TestBed } from '@angular/core/testing'; import { of, throwError } from 'rxjs'; -import { - setupTestBed, - AlfrescoApiService, - AppConfigService, - LogService, - StorageService -} from '@alfresco/adf-core'; +import { setupTestBed } from '@alfresco/adf-core'; import { StartProcessCloudService } from './start-process-cloud.service'; import { fakeProcessPayload } from '../mock/start-process.component.mock'; import { ProcessInstanceCloud } from '../models/process-instance-cloud.model'; @@ -35,8 +29,7 @@ describe('StartProcessCloudService', () => { let service: StartProcessCloudService; setupTestBed({ - imports: [HttpClientModule], - providers: [StartProcessCloudService, AlfrescoApiService, AppConfigService, LogService, StorageService] + imports: [HttpClientModule] }); beforeEach(() => { diff --git a/lib/process-services-cloud/src/lib/services/local-preference-cloud.service.ts b/lib/process-services-cloud/src/lib/services/local-preference-cloud.service.ts index 0627349f07..6135c87475 100644 --- a/lib/process-services-cloud/src/lib/services/local-preference-cloud.service.ts +++ b/lib/process-services-cloud/src/lib/services/local-preference-cloud.service.ts @@ -20,7 +20,7 @@ import { PreferenceCloudServiceInterface } from './preference-cloud.interface'; import { StorageService } from '@alfresco/adf-core'; import { Observable, of } from 'rxjs'; -@Injectable() +@Injectable({ providedIn: 'root' }) export class LocalPreferenceCloudService implements PreferenceCloudServiceInterface { constructor(private storage: StorageService) { } diff --git a/lib/process-services-cloud/src/lib/task/services/task-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/task/services/task-cloud.service.spec.ts index 2cae29aeae..04f059d1b5 100644 --- a/lib/process-services-cloud/src/lib/task/services/task-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/task/services/task-cloud.service.spec.ts @@ -82,8 +82,7 @@ describe('Task Cloud Service', () => { setupTestBed({ imports: [ CoreModule.forRoot() - ], - providers: [ IdentityUserService ] + ] }); beforeEach(async(() => { diff --git a/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.spec.ts index 8832d885e1..02e5ac4eb8 100644 --- a/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.spec.ts @@ -16,15 +16,7 @@ */ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { - setupTestBed, IdentityUserService, - AlfrescoApiService, - AppConfigService, - LogService, - StorageService, - UserPreferencesService, - IdentityUserModel -} from '@alfresco/adf-core'; +import { setupTestBed, IdentityUserService, AlfrescoApiService, IdentityUserModel } from '@alfresco/adf-core'; import { StartTaskCloudComponent } from './start-task-cloud.component'; import { of, throwError } from 'rxjs'; import { taskDetailsMock } from '../mock/task-details.mock'; @@ -56,15 +48,6 @@ describe('StartTaskCloudComponent', () => { setupTestBed({ imports: [ProcessServiceCloudTestingModule, StartTaskCloudTestingModule], - providers: [ - TaskCloudService, - AlfrescoApiService, - AppConfigService, - LogService, - StorageService, - UserPreferencesService, - FormDefinitionSelectorCloudService - ], schemas: [ CUSTOM_ELEMENTS_SCHEMA ] }); diff --git a/lib/process-services-cloud/src/lib/task/start-task/services/start-task-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/task/start-task/services/start-task-cloud.service.spec.ts index d5defdd894..a38dc25361 100644 --- a/lib/process-services-cloud/src/lib/task/start-task/services/start-task-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/task/start-task/services/start-task-cloud.service.spec.ts @@ -22,13 +22,7 @@ import { of, throwError } from 'rxjs'; import { taskDetailsMock } from '../mock/task-details.mock'; import { TaskDetailsCloudModel } from '../models/task-details-cloud.model'; import { HttpErrorResponse } from '@angular/common/http'; -import { - setupTestBed, - AlfrescoApiService, - AppConfigService, - LogService, - StorageService -} from '@alfresco/adf-core'; +import { setupTestBed } from '@alfresco/adf-core'; import { TaskCloudService } from '../../services/task-cloud.service'; describe('StartTaskCloudService', () => { @@ -37,8 +31,7 @@ describe('StartTaskCloudService', () => { const fakeAppName: string = 'fake-app'; setupTestBed({ - imports: [StartTaskCloudTestingModule], - providers: [TaskCloudService, AlfrescoApiService, AppConfigService, LogService, StorageService] + imports: [StartTaskCloudTestingModule] }); beforeEach(() => { diff --git a/lib/process-services-cloud/src/lib/task/start-task/start-task-cloud.module.ts b/lib/process-services-cloud/src/lib/task/start-task/start-task-cloud.module.ts index 2daabf023f..19e366c8fd 100644 --- a/lib/process-services-cloud/src/lib/task/start-task/start-task-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/task/start-task/start-task-cloud.module.ts @@ -19,18 +19,16 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FlexLayoutModule } from '@angular/flex-layout'; import { MaterialModule } from '../../material.module'; -import { TemplateModule, CoreModule } from '@alfresco/adf-core'; +import { CoreModule } from '@alfresco/adf-core'; import { StartTaskCloudComponent } from './components/start-task-cloud.component'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { GroupCloudModule } from '../../group/group-cloud.module'; -import { TaskCloudService } from '../services/task-cloud.service'; import { FormCloudModule } from '../../form/form-cloud.module'; import { PeopleCloudModule } from '../../people/people-cloud.module'; @NgModule({ imports: [ CommonModule, - TemplateModule, FlexLayoutModule, MaterialModule, FormsModule, @@ -41,9 +39,6 @@ import { PeopleCloudModule } from '../../people/people-cloud.module'; PeopleCloudModule ], declarations: [StartTaskCloudComponent], - providers: [ - TaskCloudService - ], exports: [ StartTaskCloudComponent ] diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.spec.ts index 14a33a5aa2..3c9e125ac8 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.spec.ts @@ -55,7 +55,6 @@ describe('TaskFiltersCloudComponent', () => { setupTestBed({ imports: [ProcessServiceCloudTestingModule, TaskFiltersCloudModule], providers: [ - TaskFilterCloudService, { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService } ] }); diff --git a/lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.spec.ts index aa40294414..c8fc8a1bd3 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.spec.ts @@ -22,10 +22,7 @@ import { AppConfigService, AppConfigServiceMock, IdentityUserService, - JwtHelperService, - LogService, - setupTestBed, - StorageService + setupTestBed } from '@alfresco/adf-core'; import { of } from 'rxjs'; import { TASK_FILTERS_SERVICE_TOKEN } from '../../../services/cloud-token.service'; @@ -58,11 +55,6 @@ describe('TaskFilterCloudService', () => { HttpClientTestingModule ], providers: [ - TaskFilterCloudService, - IdentityUserService, - LogService, - JwtHelperService, - StorageService, { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: UserPreferenceCloudService }, { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }, { provide: AppConfigService, useClass: AppConfigServiceMock } @@ -243,9 +235,6 @@ describe('Inject [LocalPreferenceCloudService] into the TaskFilterCloudService', HttpClientTestingModule ], providers: [ - TaskFilterCloudService, - IdentityUserService, - StorageService, { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService } ] }); diff --git a/lib/process-services-cloud/src/lib/task/task-filters/task-filters-cloud.module.ts b/lib/process-services-cloud/src/lib/task/task-filters/task-filters-cloud.module.ts index 4b46903217..013b32c061 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/task-filters-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/task-filters-cloud.module.ts @@ -21,7 +21,7 @@ import { CommonModule } from '@angular/common'; import { FlexLayoutModule } from '@angular/flex-layout'; import { TaskFiltersCloudComponent } from './components/task-filters-cloud.component'; import { MaterialModule } from '../../material.module'; -import { LogService, StorageService, CoreModule, MomentDateAdapter, MOMENT_DATE_FORMATS } from '@alfresco/adf-core'; +import { CoreModule, MomentDateAdapter, MOMENT_DATE_FORMATS } from '@alfresco/adf-core'; import { HttpClientModule } from '@angular/common/http'; import { EditTaskFilterCloudComponent } from './components/edit-task-filter-cloud.component'; import { TaskFilterDialogCloudComponent } from './components/task-filter-dialog-cloud.component'; @@ -42,8 +42,6 @@ import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material'; declarations: [TaskFiltersCloudComponent, EditTaskFilterCloudComponent, TaskFilterDialogCloudComponent], exports: [TaskFiltersCloudComponent, EditTaskFilterCloudComponent], providers: [ - LogService, - StorageService, { provide: DateAdapter, useClass: MomentDateAdapter }, { provide: MAT_DATE_FORMATS, useValue: MOMENT_DATE_FORMATS } ], diff --git a/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.spec.ts index daa85db4ca..040e3646f1 100644 --- a/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.spec.ts @@ -31,7 +31,7 @@ import { suspendedTaskDetailsCloudMock, taskDetailsWithParentTaskIdMock } from '../mocks/task-details-cloud.mock'; -import moment = require('moment'); +import moment from 'moment-es6'; describe('TaskHeaderCloudComponent', () => { let component: TaskHeaderCloudComponent; @@ -51,8 +51,7 @@ describe('TaskHeaderCloudComponent', () => { ProcessServiceCloudTestingModule, TaskHeaderCloudModule, RouterTestingModule - ], - providers: [TaskCloudService] + ] }); beforeEach(() => { diff --git a/lib/process-services-cloud/src/lib/task/task-header/task-header-cloud.module.ts b/lib/process-services-cloud/src/lib/task/task-header/task-header-cloud.module.ts index f676d0bfd5..bcf9d43528 100644 --- a/lib/process-services-cloud/src/lib/task/task-header/task-header-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/task/task-header/task-header-cloud.module.ts @@ -18,16 +18,13 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { MaterialModule } from '../../material.module'; -import { DataTableModule, TemplateModule, CardViewModule, CoreModule } from '@alfresco/adf-core'; +import { CoreModule } from '@alfresco/adf-core'; import { TaskHeaderCloudComponent } from './components/task-header-cloud.component'; @NgModule({ imports: [ CommonModule, MaterialModule, - DataTableModule, - TemplateModule, - CardViewModule, CoreModule ], declarations: [ diff --git a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.spec.ts index 32a25c129c..9322898b7a 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.spec.ts @@ -83,8 +83,7 @@ describe('TaskListCloudComponent', () => { setupTestBed({ imports: [ ProcessServiceCloudTestingModule, TaskListCloudModule - ], - providers: [TaskListCloudService] + ] }); beforeEach(() => { diff --git a/lib/process-services-cloud/src/lib/task/task-list/task-list-cloud.module.ts b/lib/process-services-cloud/src/lib/task/task-list/task-list-cloud.module.ts index 5daefde043..439921c4a6 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/task-list-cloud.module.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/task-list-cloud.module.ts @@ -19,19 +19,15 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { MaterialModule } from '../../material.module'; import { TaskListCloudComponent } from './components/task-list-cloud.component'; -import { DataTableModule, TemplateModule, CoreModule } from '@alfresco/adf-core'; -import { TaskListCloudService } from './services/task-list-cloud.service'; +import { CoreModule } from '@alfresco/adf-core'; @NgModule({ imports: [ CommonModule, MaterialModule, - DataTableModule, - TemplateModule, CoreModule ], declarations: [TaskListCloudComponent], - exports: [TaskListCloudComponent], - providers: [TaskListCloudService] + exports: [TaskListCloudComponent] }) export class TaskListCloudModule { } diff --git a/lib/process-services-cloud/src/lib/task/task-list/testing/task-list.testing.module.ts b/lib/process-services-cloud/src/lib/task/task-list/testing/task-list.testing.module.ts index 8449c847c5..03164376f9 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/testing/task-list.testing.module.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/testing/task-list.testing.module.ts @@ -24,11 +24,8 @@ import { AlfrescoApiServiceMock, AppConfigService, AppConfigServiceMock, - StorageService, - LogService, TranslationService, TranslationMock, - UserPreferencesService, ContextMenuModule } from '@alfresco/adf-core'; @@ -42,10 +39,7 @@ import { providers: [ { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }, { provide: AppConfigService, useClass: AppConfigServiceMock }, - { provide: TranslationService, useClass: TranslationMock }, - StorageService, - LogService, - UserPreferencesService + { provide: TranslationService, useClass: TranslationMock } ] }) export class TaskListTestingModule {} diff --git a/lib/process-services-cloud/src/lib/testing/process-service-cloud.testing.module.ts b/lib/process-services-cloud/src/lib/testing/process-service-cloud.testing.module.ts index 809422efa1..155011965a 100644 --- a/lib/process-services-cloud/src/lib/testing/process-service-cloud.testing.module.ts +++ b/lib/process-services-cloud/src/lib/testing/process-service-cloud.testing.module.ts @@ -23,11 +23,8 @@ import { AlfrescoApiServiceMock, AppConfigService, AppConfigServiceMock, - StorageService, - LogService, TranslationService, TranslationMock, - UserPreferencesService, ContextMenuModule, CoreModule } from '@alfresco/adf-core'; @@ -42,10 +39,7 @@ import { providers: [ { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }, { provide: AppConfigService, useClass: AppConfigServiceMock }, - { provide: TranslationService, useClass: TranslationMock }, - StorageService, - LogService, - UserPreferencesService + { provide: TranslationService, useClass: TranslationMock } ] }) export class ProcessServiceCloudTestingModule {} diff --git a/lib/process-services/ng-package.json b/lib/process-services/ng-package.json index 5cc35ad391..dbc4e5ce67 100644 --- a/lib/process-services/ng-package.json +++ b/lib/process-services/ng-package.json @@ -2,7 +2,6 @@ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", "dest": "../dist/process-services", "lib": { - "languageLevel": ["dom", "es2017"], "entryFile": "src/public-api.ts", "flatModuleFile": "adf-process-services", "umdModuleIds": { diff --git a/lib/process-services/src/lib/app-list/select-apps-dialog.component.spec.ts b/lib/process-services/src/lib/app-list/select-apps-dialog.component.spec.ts index 0407f4e2bb..4b193bf0b5 100644 --- a/lib/process-services/src/lib/app-list/select-apps-dialog.component.spec.ts +++ b/lib/process-services/src/lib/app-list/select-apps-dialog.component.spec.ts @@ -60,7 +60,6 @@ describe('Select app dialog', () => { imports: [ProcessTestingModule], declarations: [DialogSelectAppTestComponent], providers: [ - AppsProcessService, { provide: OverlayContainer, useFactory: () => { diff --git a/lib/process-services/src/lib/content-widget/attach-file-widget-dialog.component.ts b/lib/process-services/src/lib/content-widget/attach-file-widget-dialog.component.ts index 8c8dba3876..ef78680bfc 100644 --- a/lib/process-services/src/lib/content-widget/attach-file-widget-dialog.component.ts +++ b/lib/process-services/src/lib/content-widget/attach-file-widget-dialog.component.ts @@ -17,9 +17,9 @@ import { Component, Inject, ViewEncapsulation, ViewChild } from '@angular/core'; import { MAT_DIALOG_DATA } from '@angular/material'; -import { ExternalAlfrescoApiService, AlfrescoApiService, AuthenticationService, LoginDialogPanelComponent, SitesService, SearchService, TranslationService } from '@alfresco/adf-core'; -import { DocumentListService, ContentNodeSelectorService } from '@alfresco/adf-content-services'; +import { ExternalAlfrescoApiService, AlfrescoApiService, LoginDialogPanelComponent, SearchService, TranslationService, AuthenticationService, SitesService } from '@alfresco/adf-core'; import { AttachFileWidgetDialogComponentData } from './attach-file-widget-dialog-component.interface'; +import { DocumentListService, ContentNodeSelectorService } from '@alfresco/adf-content-services'; import { Node } from '@alfresco/js-api'; @Component({ @@ -27,12 +27,13 @@ import { Node } from '@alfresco/js-api'; templateUrl: './attach-file-widget-dialog.component.html', styleUrls: ['./attach-file-widget-dialog.component.scss'], encapsulation: ViewEncapsulation.None, - providers: [ AuthenticationService, - DocumentListService, - SitesService, - ContentNodeSelectorService, - SearchService, - { provide: AlfrescoApiService, useClass: ExternalAlfrescoApiService} ] + providers: [ + AuthenticationService, + DocumentListService, + SitesService, + ContentNodeSelectorService, + SearchService, + { provide: AlfrescoApiService, useClass: ExternalAlfrescoApiService} ] }) export class AttachFileWidgetDialogComponent { diff --git a/lib/process-services/src/lib/process-list/components/process-audit.directive.spec.ts b/lib/process-services/src/lib/process-list/components/process-audit.directive.spec.ts index 0a5f9d9253..d785251499 100644 --- a/lib/process-services/src/lib/process-list/components/process-audit.directive.spec.ts +++ b/lib/process-services/src/lib/process-list/components/process-audit.directive.spec.ts @@ -76,8 +76,7 @@ describe('ProcessAuditDirective', () => { declarations: [ BasicButtonComponent, ProcessAuditDirective - ], - providers: [ProcessService] + ] }); beforeEach(() => { diff --git a/lib/process-services/src/lib/process-list/components/process-filters.component.spec.ts b/lib/process-services/src/lib/process-list/components/process-filters.component.spec.ts index 0ed4ea75bc..f5b6728673 100644 --- a/lib/process-services/src/lib/process-list/components/process-filters.component.spec.ts +++ b/lib/process-services/src/lib/process-list/components/process-filters.component.spec.ts @@ -41,7 +41,6 @@ describe('ProcessFiltersComponent', () => { CoreModule.forRoot() ], declarations: [ProcessFiltersComponent], - providers: [AppsProcessService, ProcessFilterService], schemas: [CUSTOM_ELEMENTS_SCHEMA] }); diff --git a/lib/process-services/src/lib/process-list/components/process-instance-details.component.spec.ts b/lib/process-services/src/lib/process-list/components/process-instance-details.component.spec.ts index d0f2297b4a..0f6eacaf42 100644 --- a/lib/process-services/src/lib/process-list/components/process-instance-details.component.spec.ts +++ b/lib/process-services/src/lib/process-list/components/process-instance-details.component.spec.ts @@ -43,9 +43,6 @@ describe('ProcessInstanceDetailsComponent', () => { FormModule, TaskListModule ], - providers: [ - ProcessService - ], schemas: [NO_ERRORS_SCHEMA] }); diff --git a/lib/process-services/src/lib/task-list/components/task-audit.directive.spec.ts b/lib/process-services/src/lib/task-list/components/task-audit.directive.spec.ts index 558553dad9..6de88c6cf3 100644 --- a/lib/process-services/src/lib/task-list/components/task-audit.directive.spec.ts +++ b/lib/process-services/src/lib/task-list/components/task-audit.directive.spec.ts @@ -76,8 +76,7 @@ describe('TaskAuditDirective', () => { setupTestBed({ imports: [CoreModule.forRoot()], - declarations: [BasicButtonComponent, TaskAuditDirective], - providers: [TaskListService] + declarations: [BasicButtonComponent, TaskAuditDirective] }); beforeEach(async(() => { diff --git a/lib/testing/src/lib/core/actions/api.service.ts b/lib/testing/src/lib/core/actions/api.service.ts index acce3240b5..958fe5afd7 100644 --- a/lib/testing/src/lib/core/actions/api.service.ts +++ b/lib/testing/src/lib/core/actions/api.service.ts @@ -15,8 +15,7 @@ * limitations under the License. */ -import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api'; -import { AlfrescoApiConfig } from '@alfresco/js-api/src/alfrescoApiConfig'; +import { AlfrescoApiCompatibility as AlfrescoApi, AlfrescoApiConfig } from '@alfresco/js-api'; export class ApiService { diff --git a/lib/testing/src/lib/core/pages/public-api.ts b/lib/testing/src/lib/core/pages/public-api.ts index 0213d4b94d..c0ddb29fab 100644 --- a/lib/testing/src/lib/core/pages/public-api.ts +++ b/lib/testing/src/lib/core/pages/public-api.ts @@ -24,7 +24,6 @@ export * from './login-sso.page'; export * from './data-table-component.page'; export * from './pagination.page'; export * from './error.page'; -export * from './login.page'; export * from './notification-history.page'; export * from './form/public-api'; export * from './card-view/public-api'; diff --git a/scripts/build/build-cli.sh b/scripts/build/build-cli.sh index 17c07e61db..b867238a8c 100755 --- a/scripts/build/build-cli.sh +++ b/scripts/build/build-cli.sh @@ -4,11 +4,10 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $DIR/../../lib/cli/ -npm install -g typescript - echo "====== Cli ======" echo "====== Build ======" -npm run dist +npm install +npm run build cd $DIR/../../ if [ -e "./lib/dist/cli" ]; diff --git a/scripts/start.sh b/scripts/start.sh index 30985a8073..394f39240c 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -2,7 +2,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -eval EXEC_INSTALL=true +eval EXEC_INSTALL=false eval EXEC_UPDATE=false eval EXEC_CLEAN=false eval EXEC_DEVELOP=false diff --git a/scripts/travis/e2e/process-services-cloud-e2e.sh b/scripts/travis/e2e/process-services-cloud-e2e.sh index 2beb03af15..d63d58a75c 100755 --- a/scripts/travis/e2e/process-services-cloud-e2e.sh +++ b/scripts/travis/e2e/process-services-cloud-e2e.sh @@ -15,7 +15,7 @@ AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/ RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -host_sso "$E2E_HOST_SSO" -host_bpm "$E2E_HOST_BPM" -host_identity "$E2E_HOST_IDENTITY" -identity_admin_email "$E2E_ADMIN_EMAIL_IDENTITY" -identity_admin_password "$E2E_ADMIN_PASSWORD_IDENTITY" -prefix $TRAVIS_BUILD_NUMBER --use-dist -m 2 -save ) -./node_modules/@alfresco/adf-cli/bin/adf-cli init-aae-env --host "$E2E_HOST_BPM" --oauth "$E2E_HOST_SSO" --modelerUsername "$E2E_MODELER_USERNAME" --modelerPassword "$E2E_MODELER_PASSWORD" --devopsUsername "$E2E_DEVOPS_USERNAME" --devopsPassword "$E2E_DEVOPS_PASSWORD" --clientId 'activiti' || exit 1 +npx @alfresco/adf-cli init-aae-env --host "$E2E_HOST_BPM" --oauth "$E2E_HOST_SSO" --modelerUsername "$E2E_MODELER_USERNAME" --modelerPassword "$E2E_MODELER_PASSWORD" --devopsUsername "$E2E_DEVOPS_USERNAME" --devopsPassword "$E2E_DEVOPS_PASSWORD" --clientId 'activiti' || exit 1 node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST_BPM" -u "$E2E_ADMIN_EMAIL_IDENTITY" -p "$E2E_ADMIN_PASSWORD_IDENTITY" || exit 1 if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || $TRAVIS_PULL_REQUEST == "false" ]];