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 553ea01d97..afbe02014a 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 @@ -328,7 +328,7 @@ [allowRightSidebar]="allowRightSidebar" [allowLeftSidebar]="allowLeftSidebar" [urlFile]="urlFile" - (showViewerChange)="onViewerVisibilityChanged($event)" + (showViewerChange)="onViewerVisibilityChanged()" [sidebarLeftTemplate]="sidebarLeftTemplate" [sidebarRightTemplate]="sidebarRightTemplate"> diff --git a/demo-shell/src/app/components/search/search-extended.component.scss b/demo-shell/src/app/components/search/search-extended.component.scss index 2ea47f803d..2fd79c7ff5 100644 --- a/demo-shell/src/app/components/search/search-extended.component.scss +++ b/demo-shell/src/app/components/search/search-extended.component.scss @@ -56,6 +56,5 @@ div.app-search-results-container { .example-search-input { width: 100px; - border: 1 solid; - border-color: black; + border: 1px solid black; } diff --git a/lib/cli/scripts/init-aae-env.ts b/lib/cli/scripts/init-aae-env.ts index b8c427c9db..f05ea00fd0 100644 --- a/lib/cli/scripts/init-aae-env.ts +++ b/lib/cli/scripts/init-aae-env.ts @@ -316,10 +316,10 @@ async function main(args: ConfigArgs) { }); if (result.isValid) { - logger.error('The envirorment is up and running'); + logger.error('The environment is up and running'); await deployMissingApps(); } else { - logger.error('The envirorment is not up'); + logger.error('The environment is not up'); process.exit(1); } diff --git a/lib/content-services/src/lib/dialogs/folder.dialog.scss b/lib/content-services/src/lib/dialogs/folder.dialog.scss index 2967564cb1..53be14efdc 100644 --- a/lib/content-services/src/lib/dialogs/folder.dialog.scss +++ b/lib/content-services/src/lib/dialogs/folder.dialog.scss @@ -17,8 +17,7 @@ } .mat-checkbox-inner-container { - margin: auto 0; - margin-right: 8px; + margin: auto 8px auto 0; } } diff --git a/lib/content-services/src/lib/tag/tag-list.component.ts b/lib/content-services/src/lib/tag/tag-list.component.ts index fcd5006cc3..0132acff1e 100644 --- a/lib/content-services/src/lib/tag/tag-list.component.ts +++ b/lib/content-services/src/lib/tag/tag-list.component.ts @@ -20,6 +20,7 @@ import { TagService } from './services/tag.service'; import { PaginationModel } from '@alfresco/adf-core'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; +import { TagEntry } from '@alfresco/js-api'; /** * This component provide a list of all the tag inside the ECM @@ -39,7 +40,7 @@ export class TagListComponent implements OnInit, OnDestroy { /** * Array of tags that are displayed */ - tagsEntries: any = []; + tagsEntries: TagEntry[] = []; /** * Number of items per iteration @@ -86,7 +87,7 @@ export class TagListComponent implements OnInit, OnDestroy { } refreshTag(opts?: any) { - this.tagService.getAllTheTags(opts).subscribe((tags: any) => { + this.tagService.getAllTheTags(opts).subscribe((tags) => { this.tagsEntries = this.tagsEntries.concat(tags.list.entries); this.pagination = tags.list.pagination; this.result.emit(this.tagsEntries); diff --git a/lib/content-services/src/lib/tag/tag-node-list.component.ts b/lib/content-services/src/lib/tag/tag-node-list.component.ts index 6d0d41eb7a..ea20fe5917 100644 --- a/lib/content-services/src/lib/tag/tag-node-list.component.ts +++ b/lib/content-services/src/lib/tag/tag-node-list.component.ts @@ -17,7 +17,7 @@ import { Component, EventEmitter, Input, OnChanges, Output, ViewEncapsulation, OnDestroy, OnInit } from '@angular/core'; import { TagService } from './services/tag.service'; -import { TagPaging } from '@alfresco/js-api'; +import { TagEntry } from '@alfresco/js-api'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; @@ -41,7 +41,7 @@ export class TagNodeListComponent implements OnChanges, OnDestroy, OnInit { @Input() showDelete = true; - tagsEntries: any; + tagsEntries: TagEntry[]; /** Emitted when a tag is selected. */ @Output() @@ -73,7 +73,7 @@ export class TagNodeListComponent implements OnChanges, OnDestroy, OnInit { refreshTag() { if (this.nodeId) { - this.tagService.getTagsByNodeId(this.nodeId).subscribe((tagPaging: TagPaging) => { + this.tagService.getTagsByNodeId(this.nodeId).subscribe((tagPaging) => { this.tagsEntries = tagPaging.list.entries; this.results.emit(this.tagsEntries); }); diff --git a/lib/content-services/src/lib/version-manager/version-manager.component.scss b/lib/content-services/src/lib/version-manager/version-manager.component.scss index 29549a5d45..24298a6bfd 100644 --- a/lib/content-services/src/lib/version-manager/version-manager.component.scss +++ b/lib/content-services/src/lib/version-manager/version-manager.component.scss @@ -27,7 +27,7 @@ adf-version-manager { .adf-new-version-uploader-container { padding: 16px 0; width: 100%; - height: 0%; + height: 0; float: left; position: relative; diff --git a/lib/core/card-view/components/card-view-arrayitem/card-view-arrayitem.component.scss b/lib/core/card-view/components/card-view-arrayitem/card-view-arrayitem.component.scss index 63c2ecb79b..f665e2739a 100644 --- a/lib/core/card-view/components/card-view-arrayitem/card-view-arrayitem.component.scss +++ b/lib/core/card-view/components/card-view-arrayitem/card-view-arrayitem.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-card-view-array-item-theme($theme) { $foreground: map-get($theme, foreground); diff --git a/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.scss b/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.scss index 30d7b2b878..a6fd9db4bc 100644 --- a/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.scss +++ b/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-card-view-textitem-theme($theme) { $foreground: map-get($theme, foreground); $outline: 1px solid mat-color($alfresco-ecm-blue, A200) !default; diff --git a/lib/core/card-view/components/card-view/card-view.component.scss b/lib/core/card-view/components/card-view/card-view.component.scss index 04b07cbb11..22d1b209b3 100644 --- a/lib/core/card-view/components/card-view/card-view.component.scss +++ b/lib/core/card-view/components/card-view/card-view.component.scss @@ -1,3 +1,4 @@ +@import '~@angular/material/theming'; @mixin adf-card-view-theme($theme) { $primary: map-get($theme, primary); diff --git a/lib/core/clipboard/clipboard.component.scss b/lib/core/clipboard/clipboard.component.scss index 1c42383b65..18474e66be 100644 --- a/lib/core/clipboard/clipboard.component.scss +++ b/lib/core/clipboard/clipboard.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-clipboard-theme($theme) { $primary: map-get($theme, primary); $config: mat-typography-config(); diff --git a/lib/core/comments/comment-list.component.scss b/lib/core/comments/comment-list.component.scss index f40d139969..1d1ea44a34 100644 --- a/lib/core/comments/comment-list.component.scss +++ b/lib/core/comments/comment-list.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-task-list-comment-list-theme($theme) { $primary: map-get($theme, primary); $primaryColor: mat-color($primary, 100); diff --git a/lib/core/comments/comments.component.scss b/lib/core/comments/comments.component.scss index 49041e8b1b..901ae3ffe2 100644 --- a/lib/core/comments/comments.component.scss +++ b/lib/core/comments/comments.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-task-list-comment-theme($theme) { $foreground: map-get($theme, foreground); $header-border: 1px solid mat-color($foreground, divider); @@ -16,9 +18,8 @@ } .adf-comments-input-container { - padding: 0 15px; width: calc(100% - 30px); - padding-top: 8px; + padding: 8px 15px 0; border-bottom: $header-border; textarea { diff --git a/lib/core/datatable/components/datatable/datatable.component.scss b/lib/core/datatable/components/datatable/datatable.component.scss index c610cdd6db..e5b53e6dfc 100644 --- a/lib/core/datatable/components/datatable/datatable.component.scss +++ b/lib/core/datatable/components/datatable/datatable.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-datatable-theme($theme) { $foreground: map-get($theme, foreground); $background: map-get($theme, background); diff --git a/lib/core/directives/check-allowable-operation.directive.spec.ts b/lib/core/directives/check-allowable-operation.directive.spec.ts index aa80f435ae..64ae74c23e 100644 --- a/lib/core/directives/check-allowable-operation.directive.spec.ts +++ b/lib/core/directives/check-allowable-operation.directive.spec.ts @@ -23,7 +23,8 @@ import { CoreModule } from '../core.module'; import { TestBed } from '@angular/core/testing'; @Component({ - selector: 'adf-text-subject' + selector: 'adf-text-subject', + template: '' }) class TestComponent implements NodeAllowableOperationSubject { disabled: boolean = false; diff --git a/lib/core/directives/node-restore.directive.ts b/lib/core/directives/node-restore.directive.ts index bacd19b5db..7d7b26928e 100644 --- a/lib/core/directives/node-restore.directive.ts +++ b/lib/core/directives/node-restore.directive.ts @@ -34,7 +34,7 @@ export class RestoreMessageModel { selector: '[adf-restore]' }) export class NodeRestoreDirective { - private restoreProcessStatus; + private readonly restoreProcessStatus; /** Array of deleted nodes to restore. */ @Input('adf-restore') diff --git a/lib/core/form/components/form-renderer.component.scss b/lib/core/form/components/form-renderer.component.scss index b14652d8aa..d110656833 100644 --- a/lib/core/form/components/form-renderer.component.scss +++ b/lib/core/form/components/form-renderer.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-form-renderer-theme($theme) { $config: mat-typography-config(); diff --git a/lib/core/form/components/widgets/container/container.widget.scss b/lib/core/form/components/widgets/container/container.widget.scss index c8f9d351c9..ac2bc43071 100644 --- a/lib/core/form/components/widgets/container/container.widget.scss +++ b/lib/core/form/components/widgets/container/container.widget.scss @@ -1,3 +1,4 @@ +@import '~@angular/material/theming'; @mixin adf-form-container-widget-theme($theme) { $primary: map-get($theme, primary); diff --git a/lib/core/form/components/widgets/core/form-outcome-event.model.ts b/lib/core/form/components/widgets/core/form-outcome-event.model.ts index b7a0ee8f66..241bc7a9bd 100644 --- a/lib/core/form/components/widgets/core/form-outcome-event.model.ts +++ b/lib/core/form/components/widgets/core/form-outcome-event.model.ts @@ -21,7 +21,7 @@ import { FormOutcomeModel } from './form-outcome.model'; export class FormOutcomeEvent { - private _outcome: FormOutcomeModel; + private readonly _outcome: FormOutcomeModel; private _defaultPrevented: boolean = false; get outcome(): FormOutcomeModel { diff --git a/lib/core/form/components/widgets/core/form-widget.model.ts b/lib/core/form/components/widgets/core/form-widget.model.ts index 91144c3067..949b234f16 100644 --- a/lib/core/form/components/widgets/core/form-widget.model.ts +++ b/lib/core/form/components/widgets/core/form-widget.model.ts @@ -30,7 +30,7 @@ export abstract class FormWidgetModel { readonly form: any; readonly json: any; - constructor(form: FormModel, json: any) { + protected constructor(form: FormModel, json: any) { this.form = form; this.json = json; diff --git a/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.model.ts b/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.model.ts index 4ed690c53a..0136432153 100644 --- a/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.model.ts +++ b/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.model.ts @@ -38,7 +38,7 @@ export class DynamicTableModel extends FormWidgetModel { rows: DynamicTableRow[] = []; private _selectedRow: DynamicTableRow; - private _validators: CellValidator[] = []; + private readonly _validators: CellValidator[] = []; get selectedRow(): DynamicTableRow { return this._selectedRow; diff --git a/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.scss b/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.scss index 7e9e70e59e..103f3a1265 100644 --- a/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.scss +++ b/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.scss @@ -1,3 +1,4 @@ +@import '~@angular/material/theming'; @import '../form'; @mixin adf-dynamic-table-theme($theme) { @@ -62,9 +63,7 @@ &:focus { outline-offset: -1px; - outline-width: 1px; - outline-color: rgb(68, 138, 255); - outline-style: solid; + outline: rgb(68, 138, 255) solid 1px; } } } diff --git a/lib/core/form/components/widgets/dynamic-table/editors/row.editor.css b/lib/core/form/components/widgets/dynamic-table/editors/row.editor.css index d72e472c43..10ac2362ef 100644 --- a/lib/core/form/components/widgets/dynamic-table/editors/row.editor.css +++ b/lib/core/form/components/widgets/dynamic-table/editors/row.editor.css @@ -7,10 +7,7 @@ } .row-editor__invalid .row-editor__validation-summary { - padding-left: 16px; - padding-right: 16px; - padding-top: 8px; - padding-bottom: 8px; + padding: 8px 16px; color: #d50000; visibility: visible; } diff --git a/lib/core/form/components/widgets/form.scss b/lib/core/form/components/widgets/form.scss index 70692a4726..9ab61dd306 100644 --- a/lib/core/form/components/widgets/form.scss +++ b/lib/core/form/components/widgets/form.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-form-theme($theme) { $primary: map-get($theme, primary); $accent: map-get($theme, accent); diff --git a/lib/core/form/components/widgets/hyperlink/hyperlink.widget.scss b/lib/core/form/components/widgets/hyperlink/hyperlink.widget.scss index 739c0a9ce5..f4e125b0f9 100644 --- a/lib/core/form/components/widgets/hyperlink/hyperlink.widget.scss +++ b/lib/core/form/components/widgets/hyperlink/hyperlink.widget.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-hyperlink-widget-theme($theme) { $primary: map-get($theme, primary); diff --git a/lib/core/form/components/widgets/index.ts b/lib/core/form/components/widgets/index.ts index fef811227d..5f679b8da8 100644 --- a/lib/core/form/components/widgets/index.ts +++ b/lib/core/form/components/widgets/index.ts @@ -46,6 +46,7 @@ import { TypeaheadWidgetComponent } from './typeahead/typeahead.widget'; import { UploadWidgetComponent } from './upload/upload.widget'; import { DateTimeWidgetComponent } from './date-time/date-time.widget'; import { JsonWidgetComponent } from './json/json.widget'; +import { UploadFolderWidgetComponent } from './upload-folder/upload-folder.widget'; // core export * from './widget.component'; @@ -76,6 +77,7 @@ export * from './error/error.component'; export * from './document/document.widget'; export * from './date-time/date-time.widget'; export * from './json/json.widget'; +export * from './upload-folder/upload-folder.widget'; // editors (dynamic table) export * from './dynamic-table/dynamic-table.widget.model'; @@ -117,7 +119,8 @@ export const WIDGET_DIRECTIVES: any[] = [ DateTimeWidgetComponent, DateTimeEditorComponent, JsonWidgetComponent, - AmountEditorComponent + AmountEditorComponent, + UploadFolderWidgetComponent ]; export const MASK_DIRECTIVE: any[] = [ diff --git a/lib/core/form/components/widgets/people/people.widget.scss b/lib/core/form/components/widgets/people/people.widget.scss index 9f23320597..668d3ac214 100644 --- a/lib/core/form/components/widgets/people/people.widget.scss +++ b/lib/core/form/components/widgets/people/people.widget.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-form-people-widget-theme($theme) { $primary: map-get($theme, primary); $background: map-get($theme, background); 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 9ef17cd27a..de487472b5 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 @@ -147,7 +147,7 @@ export class UploadFolderWidgetComponent extends WidgetComponent implements OnIn file.contentBlob = blob; this.formService.formContentClicked.next(file); }, - (error) => { + () => { this.logService.error('Unable to send event for file ' + file.name); } ); diff --git a/lib/core/form/form-base.module.ts b/lib/core/form/form-base.module.ts index 55240eea78..00ef7133e3 100644 --- a/lib/core/form/form-base.module.ts +++ b/lib/core/form/form-base.module.ts @@ -37,10 +37,14 @@ import { WidgetComponent } from './components/widgets/widget.component'; import { MatDatetimepickerModule, MatNativeDatetimeModule } from '@mat-datetimepicker/core'; import { FormRendererComponent } from './components/form-renderer.component'; import { EditJsonDialogModule } from '../dialogs/edit-json/edit-json.dialog.module'; +import { A11yModule } from '@angular/cdk/a11y'; +import { FlexLayoutModule } from '@angular/flex-layout'; @NgModule({ imports: [ CommonModule, + A11yModule, + FlexLayoutModule, DataTableModule, HttpClientModule, MaterialModule, diff --git a/lib/core/info-drawer/info-drawer-layout.component.scss b/lib/core/info-drawer/info-drawer-layout.component.scss index 3b210231b0..d995f8ed32 100644 --- a/lib/core/info-drawer/info-drawer-layout.component.scss +++ b/lib/core/info-drawer/info-drawer-layout.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-info-drawer-theme($theme) { $primary: map-get($theme, primary); $background: map-get($theme, background); diff --git a/lib/core/layout/components/header/header.component.scss b/lib/core/layout/components/header/header.component.scss index a05cdd8018..1d6e4f4d6e 100644 --- a/lib/core/layout/components/header/header.component.scss +++ b/lib/core/layout/components/header/header.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-header-layout-theme($theme) { $primary: map-get($theme, primary); $accent: map-get($theme, accent); diff --git a/lib/core/layout/components/layout-container/layout-container.component.scss b/lib/core/layout/components/layout-container/layout-container.component.scss index 53a6772a5e..6e41d72541 100644 --- a/lib/core/layout/components/layout-container/layout-container.component.scss +++ b/lib/core/layout/components/layout-container/layout-container.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-layout-container-theme($theme) { $background: map-get($theme, background); $foreground: map-get($theme, foreground); diff --git a/lib/core/layout/components/sidebar-action/sidebar-action-menu.component.scss b/lib/core/layout/components/sidebar-action/sidebar-action-menu.component.scss index 8b4757e27e..bfbc6af5a5 100644 --- a/lib/core/layout/components/sidebar-action/sidebar-action-menu.component.scss +++ b/lib/core/layout/components/sidebar-action/sidebar-action-menu.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-sidebar-action-menu-theme($theme) { $primary: map-get($theme, primary); diff --git a/lib/core/login/components/login-dialog-panel.component.scss b/lib/core/login/components/login-dialog-panel.component.scss index ead8c6d6e7..a7dc7338e0 100644 --- a/lib/core/login/components/login-dialog-panel.component.scss +++ b/lib/core/login/components/login-dialog-panel.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-login-dialog-panel-theme($theme) { $primary: map-get($theme, primary); $accent: map-get($theme, accent); diff --git a/lib/core/login/components/login-dialog.component.scss b/lib/core/login/components/login-dialog.component.scss index 2e3fe96ff7..5189c1c24c 100644 --- a/lib/core/login/components/login-dialog.component.scss +++ b/lib/core/login/components/login-dialog.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-login-dialog-theme($theme) { $primary: map-get($theme, primary); $accent: map-get($theme, accent); diff --git a/lib/core/login/components/login.component.scss b/lib/core/login/components/login.component.scss index 6aa2eb61b1..b86fd878c0 100644 --- a/lib/core/login/components/login.component.scss +++ b/lib/core/login/components/login.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-login-theme($theme) { $primary: map-get($theme, primary); $accent: map-get($theme, accent); diff --git a/lib/core/login/components/login.component.ts b/lib/core/login/components/login.component.ts index 5558042ea4..7ad1e49477 100644 --- a/lib/core/login/components/login.component.ts +++ b/lib/core/login/components/login.component.ts @@ -120,7 +120,7 @@ export class LoginComponent implements OnInit, OnDestroy { isError: boolean = false; errorMsg: string; actualLoginStep: any = LoginSteps.Landing; - LoginSteps: any = LoginSteps; + LoginSteps = LoginSteps; rememberMe: boolean = true; formError: { [id: string]: string }; minLength: number = 2; diff --git a/lib/core/login/models/login-submit.event.ts b/lib/core/login/models/login-submit.event.ts index d79e317d4e..dad73eea77 100644 --- a/lib/core/login/models/login-submit.event.ts +++ b/lib/core/login/models/login-submit.event.ts @@ -17,7 +17,7 @@ export class LoginSubmitEvent { - private _values: any; + private readonly _values: any; private _defaultPrevented: boolean = false; get values(): any { diff --git a/lib/core/models/comment.model.ts b/lib/core/models/comment.model.ts index e2e824c765..9f96227343 100644 --- a/lib/core/models/comment.model.ts +++ b/lib/core/models/comment.model.ts @@ -15,11 +15,13 @@ * limitations under the License. */ +import { Person } from '@alfresco/js-api'; + export class CommentModel { id: number; message: string; created: Date; - createdBy: any; + createdBy: Person; isSelected: boolean; constructor(obj?: any) { diff --git a/lib/core/pagination/pagination.component.scss b/lib/core/pagination/pagination.component.scss index ec5c585b13..39b68db956 100644 --- a/lib/core/pagination/pagination.component.scss +++ b/lib/core/pagination/pagination.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-pagination-theme($theme) { $foreground: map-get($theme, foreground); diff --git a/lib/core/pipes/user-initial.pipe.ts b/lib/core/pipes/user-initial.pipe.ts index 414fbd08b1..8c7cf15fb9 100644 --- a/lib/core/pipes/user-initial.pipe.ts +++ b/lib/core/pipes/user-initial.pipe.ts @@ -19,6 +19,7 @@ import { Pipe, PipeTransform } from '@angular/core'; import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; import { UserProcessModel } from '../models/user-process.model'; import { EcmUserModel } from '../models/ecm-user.model'; +import { IdentityUserModel } from '../models/identity-user.model'; @Pipe({ name: 'usernameInitials' @@ -28,7 +29,7 @@ export class InitialUsernamePipe implements PipeTransform { constructor(private sanitized: DomSanitizer) { } - transform(user: UserProcessModel | EcmUserModel, className: string = '', delimiter: string = ''): SafeHtml { + transform(user: UserProcessModel | EcmUserModel | IdentityUserModel, className: string = '', delimiter: string = ''): SafeHtml { let safeHtml: SafeHtml = ''; if (user) { const initialResult = this.getInitialUserName(user.firstName, user.lastName, delimiter); diff --git a/lib/core/search-text/search-text-input.component.scss b/lib/core/search-text/search-text-input.component.scss index ae89070c3a..50797fc63a 100644 --- a/lib/core/search-text/search-text-input.component.scss +++ b/lib/core/search-text/search-text-input.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-search-text-input-theme($theme) { $background: map-get($theme, background); $foreground: map-get($theme, foreground); diff --git a/lib/core/services/comment-content.service.ts b/lib/core/services/comment-content.service.ts index efeefb599b..415b1b9c4f 100644 --- a/lib/core/services/comment-content.service.ts +++ b/lib/core/services/comment-content.service.ts @@ -21,6 +21,7 @@ import { CommentModel } from '../models/comment.model'; import { AlfrescoApiService } from '../services/alfresco-api.service'; import { LogService } from '../services/log.service'; import { map, catchError } from 'rxjs/operators'; +import { CommentEntry } from '@alfresco/js-api'; @Injectable({ providedIn: 'root' @@ -40,7 +41,7 @@ export class CommentContentService { addNodeComment(nodeId: string, message: string): Observable { return from(this.apiService.getInstance().core.commentsApi.addComment(nodeId, {content: message})) .pipe( - map((response: any) => { + map((response: CommentEntry) => { return new CommentModel({ id: response.entry.id, message: response.entry.content, @@ -60,7 +61,7 @@ export class CommentContentService { getNodeComments(nodeId: string): Observable { return from(this.apiService.getInstance().core.commentsApi.getComments(nodeId)) .pipe( - map((response: any) => { + map((response) => { const comments: CommentModel[] = []; response.list.entries.forEach((comment: any) => { comments.push(new CommentModel({ diff --git a/lib/core/services/comment-process.service.ts b/lib/core/services/comment-process.service.ts index 7ee6287f6e..73cd08ed2e 100644 --- a/lib/core/services/comment-process.service.ts +++ b/lib/core/services/comment-process.service.ts @@ -41,7 +41,7 @@ export class CommentProcessService { addTaskComment(taskId: string, message: string): Observable { return from(this.apiService.getInstance().activiti.taskApi.addTaskComment({ message: message }, taskId)) .pipe( - map((response: CommentModel) => { + map((response) => { return new CommentModel({ id: response.id, message: response.message, @@ -61,9 +61,9 @@ export class CommentProcessService { getTaskComments(taskId: string): Observable { return from(this.apiService.getInstance().activiti.taskApi.getTaskComments(taskId)) .pipe( - map((response: any) => { + map((response) => { const comments: CommentModel[] = []; - response.data.forEach((comment: CommentModel) => { + response.data.forEach((comment) => { const user = new UserProcessModel(comment.createdBy); comments.push(new CommentModel({ id: comment.id, @@ -86,9 +86,9 @@ export class CommentProcessService { getProcessInstanceComments(processInstanceId: string): Observable { return from(this.apiService.getInstance().activiti.commentsApi.getProcessInstanceComments(processInstanceId)) .pipe( - map((response: any) => { + map((response) => { const comments: CommentModel[] = []; - response.data.forEach((comment: CommentModel) => { + response.data.forEach((comment) => { const user = new UserProcessModel(comment.createdBy); comments.push(new CommentModel({ id: comment.id, @@ -113,7 +113,7 @@ export class CommentProcessService { return from( this.apiService.getInstance().activiti.commentsApi.addProcessInstanceComment({ message: message }, processInstanceId) ).pipe( - map((response: CommentModel) => { + map((response) => { return new CommentModel({ id: response.id, message: response.message, diff --git a/lib/core/services/download.service.ts b/lib/core/services/download.service.ts index f728230f98..77e9f5edeb 100644 --- a/lib/core/services/download.service.ts +++ b/lib/core/services/download.service.ts @@ -21,7 +21,7 @@ import { Injectable } from '@angular/core'; providedIn: 'root' }) export class DownloadService { - private saveData: Function; + private readonly saveData: Function; constructor() { this.saveData = (function() { diff --git a/lib/core/services/storage.service.ts b/lib/core/services/storage.service.ts index a195be4f83..651028533c 100644 --- a/lib/core/services/storage.service.ts +++ b/lib/core/services/storage.service.ts @@ -23,7 +23,7 @@ import { Injectable } from '@angular/core'; export class StorageService { private memoryStore: { [key: string]: any } = {}; - private useLocalStorage: boolean = false; + private readonly useLocalStorage: boolean = false; private _prefix: string = ''; get prefix() { diff --git a/lib/core/styles/_default-class.scss b/lib/core/styles/_default-class.scss index 87eddc72b6..fed1ebac5e 100644 --- a/lib/core/styles/_default-class.scss +++ b/lib/core/styles/_default-class.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-default-class-theme($theme) { .adf-hide-small { diff --git a/lib/core/styles/_mixins.scss b/lib/core/styles/_mixins.scss index 03e77e1d92..1e26f473b4 100644 --- a/lib/core/styles/_mixins.scss +++ b/lib/core/styles/_mixins.scss @@ -1,3 +1,4 @@ +@import '~@angular/material/theming'; @import 'variables'; @mixin adf-no-select { diff --git a/lib/core/styles/_theme-colors.scss b/lib/core/styles/_theme-colors.scss index 3daa77ed76..29ae4ebcd4 100644 --- a/lib/core/styles/_theme-colors.scss +++ b/lib/core/styles/_theme-colors.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-colors-theme($theme) { $primary: map-get($theme, primary); diff --git a/lib/core/styles/snackbar.scss b/lib/core/styles/snackbar.scss index cc98a1b8e0..53fdf41c3f 100644 --- a/lib/core/styles/snackbar.scss +++ b/lib/core/styles/snackbar.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-snackbar-theme($theme) { $warn: map-get($theme, warn); $accent: map-get($theme, accent); diff --git a/lib/core/templates/empty-content/empty-content.component.scss b/lib/core/templates/empty-content/empty-content.component.scss index 8c63bdadff..7a3c0d2f79 100644 --- a/lib/core/templates/empty-content/empty-content.component.scss +++ b/lib/core/templates/empty-content/empty-content.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-empty-content-theme($theme) { $config: mat-typography-config(); diff --git a/lib/core/templates/error-content/error-content.component.scss b/lib/core/templates/error-content/error-content.component.scss index 94d7048dcd..21a20416c4 100644 --- a/lib/core/templates/error-content/error-content.component.scss +++ b/lib/core/templates/error-content/error-content.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-error-content-theme($theme) { $primary: map-get($theme, primary); diff --git a/lib/core/toolbar/toolbar.component.scss b/lib/core/toolbar/toolbar.component.scss index 1f85cb8d6a..663c502345 100644 --- a/lib/core/toolbar/toolbar.component.scss +++ b/lib/core/toolbar/toolbar.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-toolbar-theme($theme) { $foreground: map-get($theme, foreground); $adf-toolbar-height: 48px !default; diff --git a/lib/core/toolbar/toolbar.component.ts b/lib/core/toolbar/toolbar.component.ts index e955b06da3..79bd5fd225 100644 --- a/lib/core/toolbar/toolbar.component.ts +++ b/lib/core/toolbar/toolbar.component.ts @@ -16,6 +16,7 @@ */ import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core'; +import { ThemePalette } from '@angular/material/core'; @Component({ selector: 'adf-toolbar', @@ -33,6 +34,6 @@ export class ToolbarComponent { /** Toolbar color. Can be changed to empty value (default), `primary`, `accent` or `warn`. */ @Input() - color: string; + color: ThemePalette; } diff --git a/lib/core/userinfo/components/user-info.component.scss b/lib/core/userinfo/components/user-info.component.scss index a975720e8d..d7b088850f 100644 --- a/lib/core/userinfo/components/user-info.component.scss +++ b/lib/core/userinfo/components/user-info.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-userinfo-theme($theme) { $primary: map-get($theme, primary); $accent: map-get($theme, accent); diff --git a/lib/core/userinfo/components/user-info.component.ts b/lib/core/userinfo/components/user-info.component.ts index 46e1aab2cc..b48e34f99b 100644 --- a/lib/core/userinfo/components/user-info.component.ts +++ b/lib/core/userinfo/components/user-info.component.ts @@ -24,7 +24,7 @@ import { BpmUserService } from '../../services/bpm-user.service'; import { EcmUserService } from '../../services/ecm-user.service'; import { IdentityUserService } from '../../services/identity-user.service'; import { of, Observable } from 'rxjs'; -import { MatMenuTrigger } from '@angular/material'; +import { MatMenuTrigger, MenuPositionX, MenuPositionY } from '@angular/material'; @Component({ selector: 'adf-userinfo', @@ -46,11 +46,11 @@ export class UserInfoComponent implements OnInit { /** Custom choice for opening the menu at the bottom. Can be `before` or `after`. */ @Input() - menuPositionX: string = 'after'; + menuPositionX: MenuPositionX = 'after'; /** Custom choice for opening the menu at the bottom. Can be `above` or `below`. */ @Input() - menuPositionY: string = 'below'; + menuPositionY: MenuPositionY = 'below'; /** Shows/hides the username next to the user info button. */ @Input() diff --git a/lib/core/viewer/components/imgViewer.component.scss b/lib/core/viewer/components/imgViewer.component.scss index 17a7d231ac..f691a14fe3 100644 --- a/lib/core/viewer/components/imgViewer.component.scss +++ b/lib/core/viewer/components/imgViewer.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-image-viewer-theme($theme) { $background: map-get($theme, background); $viewer-image-outline: 1px solid mat-color($alfresco-ecm-blue, A200) !default; diff --git a/lib/core/viewer/components/pdfViewer-password-dialog.scss b/lib/core/viewer/components/pdfViewer-password-dialog.scss index eae6b8d83c..b6afe8e89c 100644 --- a/lib/core/viewer/components/pdfViewer-password-dialog.scss +++ b/lib/core/viewer/components/pdfViewer-password-dialog.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + .adf-fill-remaining-space { flex: 1 1 auto; } diff --git a/lib/core/viewer/components/pdfViewer-thumbnails.component.scss b/lib/core/viewer/components/pdfViewer-thumbnails.component.scss index d790dcea4c..f64ec6a39a 100644 --- a/lib/core/viewer/components/pdfViewer-thumbnails.component.scss +++ b/lib/core/viewer/components/pdfViewer-thumbnails.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-pdf-thumbnails-theme($theme) { $background: map-get($theme, background); diff --git a/lib/core/viewer/components/pdfViewer.component.scss b/lib/core/viewer/components/pdfViewer.component.scss index 99d03bfc4e..0edff0ac25 100644 --- a/lib/core/viewer/components/pdfViewer.component.scss +++ b/lib/core/viewer/components/pdfViewer.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-pdf-viewer-theme($theme) { $background: map-get($theme, background); $foreground: map-get($theme, foreground); @@ -47,12 +49,12 @@ &__container { display: flex; - height: 100%; + height: 100%; } &__content { flex: 1 1 auto; - position: relative; + position: relative; } .adf-loader-item { diff --git a/lib/core/viewer/components/pdfViewerHost.component.scss b/lib/core/viewer/components/pdfViewerHost.component.scss index da98fd456c..6a75087c76 100644 --- a/lib/core/viewer/components/pdfViewerHost.component.scss +++ b/lib/core/viewer/components/pdfViewerHost.component.scss @@ -399,11 +399,11 @@ position: absolute; white-space: pre; cursor: text; - -webkit-transform-origin: 0% 0%; - -moz-transform-origin: 0% 0%; - -o-transform-origin: 0% 0%; - -ms-transform-origin: 0% 0%; - transform-origin: 0% 0%; + -webkit-transform-origin: 0 0; + -moz-transform-origin: 0 0; + -o-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; } .adf-highlight { diff --git a/lib/core/viewer/components/txtViewer.component.scss b/lib/core/viewer/components/txtViewer.component.scss index 34c5e86db2..c0fc86fe80 100644 --- a/lib/core/viewer/components/txtViewer.component.scss +++ b/lib/core/viewer/components/txtViewer.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-text-viewer-theme($theme) { $background: map-get($theme, background); diff --git a/lib/core/viewer/components/viewer.component.scss b/lib/core/viewer/components/viewer.component.scss index 6937f3f370..5409da5bc5 100644 --- a/lib/core/viewer/components/viewer.component.scss +++ b/lib/core/viewer/components/viewer.component.scss @@ -1,3 +1,5 @@ +@import '~@angular/material/theming'; + @mixin adf-viewer-theme($theme) { $background: map-get($theme, background); $foreground: map-get($theme, foreground); diff --git a/lib/insights/src/lib/diagram/components/diagram.element.options.ts b/lib/insights/src/lib/diagram/components/diagram.element.options.ts new file mode 100644 index 0000000000..a0300a3336 --- /dev/null +++ b/lib/insights/src/lib/diagram/components/diagram.element.options.ts @@ -0,0 +1,24 @@ +/*! + * @license + * Copyright 2019 Alfresco Software, Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface DiagramElementOptions { + stroke?: string; + fillColors?: string; + fillOpacity?: string; + strokeWidth?: number; + radius?: number; +} diff --git a/lib/process-services-cloud/src/lib/form/components/form-cloud.component.ts b/lib/process-services-cloud/src/lib/form/components/form-cloud.component.ts index 009afe2e09..003a9fc980 100644 --- a/lib/process-services-cloud/src/lib/form/components/form-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/form/components/form-cloud.component.ts @@ -34,7 +34,8 @@ import { FormFieldValidator, FormValues, FormModel, - AppConfigService + AppConfigService, + ContentLinkModel } from '@alfresco/adf-core'; import { FormCloudService } from '../services/form-cloud.service'; import { TaskVariableCloud } from '../models/task-variable-cloud.model'; @@ -101,7 +102,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges, /** Emitted when form content is clicked. */ @Output() - formContentClicked = new EventEmitter(); + formContentClicked = new EventEmitter(); protected subscriptions: Subscription[] = []; nodeId: string; @@ -119,7 +120,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges, this.formService.formContentClicked .pipe(takeUntil(this.onDestroy$)) - .subscribe((content: any) => { + .subscribe((content) => { this.formContentClicked.emit(content); }); this.formRenderingService.setComponentTypeResolver('upload', () => AttachFileCloudWidgetComponent, true); 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 031dd86eae..6e05d2b81b 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 @@ -88,7 +88,7 @@ export class AttachFileCloudWidgetComponent extends UploadCloudWidgetComponent this.onFileChanged(event); } - onRemoveAttachFile(file: File | RelatedContentRepresentation) { + onRemoveAttachFile(file: File | RelatedContentRepresentation | Node) { this.removeFile(file); } diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.scss b/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.scss index e7b838027f..4444febd4a 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.scss +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/task-filters-cloud.component.scss @@ -28,7 +28,7 @@ } &-menu-list { - padding-top: 0px!important; + padding-top: 0 !important; } } } 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 0ce5bb70be..941cb823e2 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 @@ -25,6 +25,7 @@ import { fakeGlobalTask, fakeCustomSchema } from '../mock/fakeTaskResponseMock'; import { of } from 'rxjs'; import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module'; import { TaskListCloudModule } from '../task-list-cloud.module'; +import { Person } from '@alfresco/js-api'; @Component({ template: ` @@ -34,7 +35,7 @@ import { TaskListCloudModule } from '../task-list-cloud.module'; -
{{getFullName(entry.row.obj.startedBy)}}
+
{{getFullName(entry.row?.obj?.startedBy)}}
@@ -43,7 +44,11 @@ import { TaskListCloudModule } from '../task-list-cloud.module'; class CustomTaskListComponent { @ViewChild(TaskListCloudComponent) taskList: TaskListCloudComponent; -} + + getFullName(person: Person): string { + return `${person.firstName} ${person.lastName}`; + } + } @Component({ template: ` diff --git a/lib/process-services/src/lib/attachment/create-process-attachment.component.css b/lib/process-services/src/lib/attachment/create-process-attachment.component.css index cd8f81bc36..8dd1bb1964 100644 --- a/lib/process-services/src/lib/attachment/create-process-attachment.component.css +++ b/lib/process-services/src/lib/attachment/create-process-attachment.component.css @@ -1,5 +1,5 @@ .adf-create-attachment { display: inline-block; - line-height: 0px; + line-height: 0; vertical-align: middle; } diff --git a/lib/process-services/src/lib/people/components/people-search/people-search.component.scss b/lib/process-services/src/lib/people/components/people-search/people-search.component.scss index 499000db8d..89279e9657 100644 --- a/lib/process-services/src/lib/people/components/people-search/people-search.component.scss +++ b/lib/process-services/src/lib/people/components/people-search/people-search.component.scss @@ -11,10 +11,7 @@ } .adf-fix-element-user-list { - padding-top: 0; - padding-right: 0; - padding-bottom: 0; - padding-left: 0; + padding: 0; } .adf-search-text-header { diff --git a/lib/process-services/src/lib/process-comments/process-comments.component.scss b/lib/process-services/src/lib/process-comments/process-comments.component.scss index 90e0ccd21c..b2ed605749 100644 --- a/lib/process-services/src/lib/process-comments/process-comments.component.scss +++ b/lib/process-services/src/lib/process-comments/process-comments.component.scss @@ -43,9 +43,8 @@ } .adf-comments-input-container { - padding: 0 15px; width: calc(100% - 30px); - padding-top: 8px; + padding: 8px 15px 0; border-bottom: $header-border; } diff --git a/lib/process-services/src/lib/process-list/components/process-filters.component.scss b/lib/process-services/src/lib/process-list/components/process-filters.component.scss index 0a9c53a96e..ccc35d7822 100644 --- a/lib/process-services/src/lib/process-list/components/process-filters.component.scss +++ b/lib/process-services/src/lib/process-list/components/process-filters.component.scss @@ -25,7 +25,7 @@ } &-menu-list { - padding-top: 0px!important; + padding-top: 0 !important; } } } diff --git a/lib/process-services/src/lib/task-list/components/task-filters.component.scss b/lib/process-services/src/lib/task-list/components/task-filters.component.scss index 0a1f11abea..c3b4141903 100644 --- a/lib/process-services/src/lib/task-list/components/task-filters.component.scss +++ b/lib/process-services/src/lib/task-list/components/task-filters.component.scss @@ -28,7 +28,7 @@ } &-menu-list { - padding-top: 0px!important; + padding-top: 0 !important; } } } diff --git a/lib/process-services/src/lib/task-list/components/task-list.component.spec.ts b/lib/process-services/src/lib/task-list/components/task-list.component.spec.ts index 53359b2dc7..a479347028 100644 --- a/lib/process-services/src/lib/task-list/components/task-list.component.spec.ts +++ b/lib/process-services/src/lib/task-list/components/task-list.component.spec.ts @@ -542,7 +542,7 @@ describe('TaskListComponent', () => { -
{{entry.row.obj.startedBy | fullName}}
+
{{entry.row?.obj?.startedBy | fullName}}